Skip to content

Commit

Permalink
Merge pull request #583 from masaeedu/relaxnetstandard
Browse files Browse the repository at this point in the history
Relax netstandard platform requirement
  • Loading branch information
somdoron authored Jul 14, 2016
2 parents 68d8c2e + 4d6b5b5 commit dd31163
Show file tree
Hide file tree
Showing 9 changed files with 30 additions and 30 deletions.
2 changes: 1 addition & 1 deletion src/NetMQ/Core/MonitorEvent.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ internal class MonitorEvent

static MonitorEvent()
{
#if NETSTANDARD1_6
#if NETSTANDARD1_3
s_sizeOfIntPtr = Marshal.SizeOf<IntPtr>();
#else
s_sizeOfIntPtr = Marshal.SizeOf(typeof(IntPtr));
Expand Down
2 changes: 1 addition & 1 deletion src/NetMQ/Core/Transports/Pgm/PgmSocket.cs
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ internal void Init()
Debug.WriteLine(xMsg);
// If running on Microsoft Windows, suggest to the developer that he may need to install MSMQ in order to get PGM socket support.

#if NETSTANDARD1_6
#if NETSTANDARD1_3
bool isWindows = RuntimeInformation.IsOSPlatform(OSPlatform.Windows);
#else
PlatformID p = Environment.OSVersion.Platform;
Expand Down
2 changes: 1 addition & 1 deletion src/NetMQ/Core/Transports/Tcp/TcpAddress.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public void Resolve(string name, bool ip4Only)
}
else if (!IPAddress.TryParse(addrStr, out ipAddress))
{
#if NETSTANDARD1_6
#if NETSTANDARD1_3
var availableAddresses = Dns.GetHostEntryAsync(addrStr).Result.AddressList;
#else
var availableAddresses = Dns.GetHostEntry(addrStr).AddressList;
Expand Down
4 changes: 2 additions & 2 deletions src/NetMQ/Core/Utils/Clock.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ internal static class Clock

static Clock()
{
#if !NETSTANDARD1_6
#if !NETSTANDARD1_3
try
{

Expand Down Expand Up @@ -110,7 +110,7 @@ public static long NowMs()
/// </summary>
public static long Rdtsc()
{
#if NETSTANDARD1_6
#if NETSTANDARD1_3
return 0;
#else
return s_rdtscSupported ? (long)Opcode.Rdtsc() : 0;
Expand Down
2 changes: 1 addition & 1 deletion src/NetMQ/Core/Utils/OpCode.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#if !NETSTANDARD1_6
#if !NETSTANDARD1_3
using System;
using System.Reflection;
using System.Runtime.InteropServices;
Expand Down
2 changes: 1 addition & 1 deletion src/NetMQ/Core/Utils/PollerBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public int Load
{
get
{
#if NETSTANDARD1_6
#if NETSTANDARD1_3
return Volatile.Read(ref m_load);
#else
Thread.MemoryBarrier();
Expand Down
2 changes: 1 addition & 1 deletion src/NetMQ/NetMQBeacon.cs
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ public string HostName

try
{
#if NETSTANDARD1_6
#if NETSTANDARD1_3
return m_hostName = Dns.GetHostEntryAsync(boundTo).Result.HostName;
#else
return m_hostName = Dns.GetHostEntry(boundTo).HostName;
Expand Down
38 changes: 19 additions & 19 deletions src/NetMQ/NetMQException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
using System.Net.Sockets;
using System.Runtime.Serialization;

#if !NETSTANDARD1_6
#if !NETSTANDARD1_3
using System.Security.Permissions;
#endif

Expand All @@ -14,7 +14,7 @@ namespace NetMQ
/// <summary>
/// Base class for custom exceptions within the NetMQ library.
/// </summary>
#if !NETSTANDARD1_6
#if !NETSTANDARD1_3
[Serializable]
#endif
public class NetMQException : Exception
Expand Down Expand Up @@ -44,7 +44,7 @@ public NetMQException(string message, Exception innerException)
: base(message, innerException)
{}

#if !NETSTANDARD1_6
#if !NETSTANDARD1_3

/// <summary>Constructor for serialisation.</summary>
protected NetMQException(SerializationInfo info, StreamingContext context)
Expand Down Expand Up @@ -183,7 +183,7 @@ private static NetMQException Create(ErrorCode errorCode, [CanBeNull] string mes
/// <summary>
/// AddressAlreadyInUseException is a NetMQException that is used within SocketBase.Bind to signal an address-conflict.
/// </summary>
#if !NETSTANDARD1_6
#if !NETSTANDARD1_3
[Serializable]
#endif
public class AddressAlreadyInUseException : NetMQException
Expand All @@ -207,7 +207,7 @@ public AddressAlreadyInUseException([CanBeNull] string message)
{
}

#if !NETSTANDARD1_6
#if !NETSTANDARD1_3
/// <summary>Constructor for serialisation.</summary>
protected AddressAlreadyInUseException(SerializationInfo info, StreamingContext context)
: base(info, context)
Expand All @@ -219,7 +219,7 @@ protected AddressAlreadyInUseException(SerializationInfo info, StreamingContext
/// <summary>
/// EndpointNotFoundException is a NetMQException that is used within Ctx.FindEndpoint to signal a failure to find a specified address.
/// </summary>
#if !NETSTANDARD1_6
#if !NETSTANDARD1_3
[Serializable]
#endif
public class EndpointNotFoundException : NetMQException
Expand Down Expand Up @@ -251,7 +251,7 @@ public EndpointNotFoundException()
{
}

#if !NETSTANDARD1_6
#if !NETSTANDARD1_3
/// <summary>Constructor for serialisation.</summary>
protected EndpointNotFoundException(SerializationInfo info, StreamingContext context)
: base(info, context)
Expand All @@ -264,7 +264,7 @@ protected EndpointNotFoundException(SerializationInfo info, StreamingContext con
/// TerminatingException is a NetMQException that is used within SocketBase and Ctx to signal
/// that you're making the mistake of trying to do further work after terminating the message-queueing system.
/// </summary>
#if !NETSTANDARD1_6
#if !NETSTANDARD1_3
[Serializable]
#endif
public class TerminatingException : NetMQException
Expand Down Expand Up @@ -293,7 +293,7 @@ internal TerminatingException()
: this(null, null)
{
}
#if !NETSTANDARD1_6
#if !NETSTANDARD1_3
/// <summary>Constructor for serialisation.</summary>
protected TerminatingException(SerializationInfo info, StreamingContext context)
: base(info, context)
Expand All @@ -305,7 +305,7 @@ protected TerminatingException(SerializationInfo info, StreamingContext context)
/// <summary>
/// InvalidException is a NetMQException that is used within the message-queueing system to signal invalid value errors.
/// </summary>
#if !NETSTANDARD1_6
#if !NETSTANDARD1_3
[Serializable]
#endif
public class InvalidException : NetMQException
Expand Down Expand Up @@ -336,7 +336,7 @@ public InvalidException()
: this(null, null)
{
}
#if !NETSTANDARD1_6
#if !NETSTANDARD1_3
/// <summary>Constructor for serialisation.</summary>
protected InvalidException(SerializationInfo info, StreamingContext context)
: base(info, context)
Expand All @@ -348,7 +348,7 @@ protected InvalidException(SerializationInfo info, StreamingContext context)
/// <summary>
/// FaultException is a NetMQException that is used within the message-queueing system to signal general fault conditions.
/// </summary>
#if !NETSTANDARD1_6
#if !NETSTANDARD1_3
[Serializable]
#endif
public class FaultException : NetMQException
Expand Down Expand Up @@ -379,7 +379,7 @@ public FaultException()
: this(null, null)
{
}
#if !NETSTANDARD1_6
#if !NETSTANDARD1_3
/// <summary>Constructor for serialisation.</summary>
protected FaultException(SerializationInfo info, StreamingContext context)
: base(info, context)
Expand All @@ -392,7 +392,7 @@ protected FaultException(SerializationInfo info, StreamingContext context)
/// ProtocolNotSupportedException is a NetMQException that is used within the message-queueing system to signal
/// mistakes in properly utilizing the communications protocols.
/// </summary>
#if !NETSTANDARD1_6
#if !NETSTANDARD1_3
[Serializable]
#endif
public class ProtocolNotSupportedException : NetMQException
Expand Down Expand Up @@ -423,7 +423,7 @@ public ProtocolNotSupportedException()
: this(null, null)
{
}
#if !NETSTANDARD1_6
#if !NETSTANDARD1_3
/// <summary>Constructor for serialisation.</summary>
protected ProtocolNotSupportedException(SerializationInfo info, StreamingContext context)
: base(info, context)
Expand All @@ -436,7 +436,7 @@ protected ProtocolNotSupportedException(SerializationInfo info, StreamingContext
/// HostUnreachableException is an Exception that is used within the message-queueing system
/// to signal failures to communicate with a host.
/// </summary>
#if !NETSTANDARD1_6
#if !NETSTANDARD1_3
[Serializable]
#endif
public class HostUnreachableException : NetMQException
Expand Down Expand Up @@ -467,7 +467,7 @@ public HostUnreachableException()
: this(null, null)
{
}
#if !NETSTANDARD1_6
#if !NETSTANDARD1_3
/// <summary>Constructor for serialisation.</summary>
protected HostUnreachableException(SerializationInfo info, StreamingContext context)
: base(info, context)
Expand All @@ -480,7 +480,7 @@ protected HostUnreachableException(SerializationInfo info, StreamingContext cont
/// FiniteStateMachineException is an Exception that is used within the message-queueing system
/// to signal errors in the send/receive order with request/response sockets.
/// </summary>
#if !NETSTANDARD1_6
#if !NETSTANDARD1_3
[Serializable]
#endif
public class FiniteStateMachineException : NetMQException
Expand Down Expand Up @@ -511,7 +511,7 @@ public FiniteStateMachineException()
: this(null, null)
{
}
#if !NETSTANDARD1_6
#if !NETSTANDARD1_3
/// <summary>Constructor for serialisation.</summary>
protected FiniteStateMachineException(SerializationInfo info, StreamingContext context)
: base(info, context)
Expand Down
6 changes: 3 additions & 3 deletions src/NetMQ/project.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"version": "4.0.0.0",
"projectUrl": "https://github.com/zeromq/netmq",
"title": "NetMQ",
"description": "A 100% native C# port of the lightweight high performance messaging library ZeroMQ",
"packOptions": {
"summary": "A 100% native C# port of the lightweight high performance messaging library ZeroMQ",
"licenseUrl": "https://github.com/zeromq/netmq/blob/master/COPYING.LESSER",
"iconUrl": "https://raw.githubusercontent.com/zeromq/netmq/master/img/NetMQ.ico",
"projectUrl": "https://github.com/zeromq/netmq",
"repository": {
"type": "git",
"url": "https://github.com/zeromq/netmq"
Expand All @@ -19,14 +19,14 @@
"keyFile": "./NetMQ.snk"
},
"dependencies": {
"AsyncIO": "0.1.20.0",
"AsyncIO": "0.1.21",
"JetBrains.Annotations": {
"version": "10.1.5",
"type": "build"
}
},
"frameworks": {
"netstandard1.6": {
"netstandard1.3": {
"dependencies": {
"NETStandard.Library": "1.6.0",
"System.ServiceModel.Primitives": "4.1.0",
Expand Down

0 comments on commit dd31163

Please sign in to comment.