Skip to content

Commit

Permalink
Merge pull request #1 from drewnoakes/obsoletion-messages
Browse files Browse the repository at this point in the history
Obsoletion messages explain that APIs will be removed in NetMQ 4.0
  • Loading branch information
Dale Brubaker authored and Dale Brubaker committed Feb 19, 2016
2 parents d330286 + 230fcbd commit 5bd0807
Show file tree
Hide file tree
Showing 37 changed files with 147 additions and 147 deletions.
2 changes: 1 addition & 1 deletion src/NetMQ.Tests/OutgoingSocketExtensionsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ public MockOutgoingSocket(TrySendDelegate action)
m_action = action;
}

[Obsolete("Use Send(ref Msg, bool) or TrySend(ref Msg,TimeSpan, bool) instead.")]
[Obsolete("Use Send(ref Msg, bool) or TrySend(ref Msg,TimeSpan, bool) instead. This will be removed in NetMQ 4.0.")]
public void Send(ref Msg msg, SendReceiveOptions options)
{

Expand Down
2 changes: 1 addition & 1 deletion src/NetMQ.Tests/ReceivingSocketExtensionsTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ internal class MockReceivingSocket : IReceivingSocket
[Obsolete]
public SendReceiveOptions LastOptions { get; private set; }

[Obsolete("Use Receive(ref Msg) or TryReceive(ref Msg,TimeSpan) instead.")]
[Obsolete("Use Receive(ref Msg) or TryReceive(ref Msg,TimeSpan) instead. This will be removed in NetMQ 4.0.")]
public void Receive(ref Msg msg, SendReceiveOptions options)
{
LastOptions = options;
Expand Down
4 changes: 2 additions & 2 deletions src/NetMQ/Blob.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ namespace NetMQ
/// Class Blob serves to hold a byte-array buffer and methods for creating and accessing it.
/// Use NetMQFrame instead; Blob is still present simply for backward compatibility.
/// </summary>
[Obsolete("Use NetMQFrame instead of Blob")]
[Obsolete("Use NetMQFrame instead of Blob. This will be removed in NetMQ 4.0.")]
public class Blob
{
[NotNull]
Expand All @@ -45,7 +45,7 @@ public Blob([NotNull] byte[] data, int size)
{
m_buffer = new byte[size];

Buffer.BlockCopy(data, 0, m_buffer, 0, size);
Buffer.BlockCopy(data, 0, m_buffer, 0, size);
}

/// <summary>
Expand Down
12 changes: 6 additions & 6 deletions src/NetMQ/Core/Options.cs
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
Copyright (c) 2009-2011 250bpm s.r.o.
Copyright (c) 2011 VMware, Inc.
Copyright (c) 2007-2015 Other contributors as noted in the AUTHORS file
This file is part of 0MQ.
0MQ is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
0MQ is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
Expand Down Expand Up @@ -145,7 +145,7 @@ public Options()
/// <summary>
/// Get or set the maximum size of message to handle.
/// </summary>
[Obsolete("Use MaxMessageSize")]
[Obsolete("Use MaxMessageSize. This will be removed in NetMQ 4.0.")]
public long Maxmsgsize
{
get { return this.MaxMessageSize; }
Expand Down Expand Up @@ -226,7 +226,7 @@ public long Maxmsgsize
/// Get or set the timeout for receive operations for this socket.
/// The default value is -1, which means no timeout.
/// </summary>
[Obsolete("Pass a TimeSpan value directly to socket receive methods instead.")]
[Obsolete("Pass a TimeSpan value directly to socket receive methods instead. This will be removed in NetMQ 4.0.")]
public int ReceiveTimeout { get; set; }

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/NetMQ/Core/ZmqSocketOption.cs
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ internal enum ZmqSocketOption
/// <summary>
/// Specifies the amount of time after which a synchronous receive call will time out.
/// </summary>
[Obsolete("Pass a TimeSpan value directly to socket receive methods instead.")]
[Obsolete("Pass a TimeSpan value directly to socket receive methods instead. This will be removed in NetMQ 4.0.")]
ReceiveTimeout = 27,

/// <summary>
Expand Down
4 changes: 2 additions & 2 deletions src/NetMQ/Devices/ForwarderDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public class ForwarderDevice : DeviceBase
/// <param name="frontendBindAddress">The endpoint used to bind the frontend socket.</param>
/// <param name="backendBindAddress">The endpoint used to bind the backend socket.</param>
/// <param name="mode">The <see cref="DeviceMode"/> for the device.</param>
[Obsolete("Use non context version")]
[Obsolete("Use non context version. This will be removed in NetMQ 4.0.")]
public ForwarderDevice(NetMQContext context, string frontendBindAddress, string backendBindAddress,
DeviceMode mode = DeviceMode.Threaded)
: base(context.CreateSubscriberSocket(), context.CreatePublisherSocket(), mode)
Expand All @@ -48,7 +48,7 @@ public ForwarderDevice(NetMQContext context, string frontendBindAddress, string
/// <param name="frontendBindAddress">The endpoint used to bind the frontend socket.</param>
/// <param name="backendBindAddress">The endpoint used to bind the backend socket.</param>
/// <param name="mode">The <see cref="DeviceMode"/> for the device.</param>
[Obsolete("Use non context version")]
[Obsolete("Use non context version. This will be removed in NetMQ 4.0.")]
public ForwarderDevice(NetMQContext context, INetMQPoller poller, string frontendBindAddress, string backendBindAddress,
DeviceMode mode = DeviceMode.Threaded)
: base(poller, context.CreateSubscriberSocket(), context.CreatePublisherSocket(), mode)
Expand Down
4 changes: 2 additions & 2 deletions src/NetMQ/Devices/QueueDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public class QueueDevice : DeviceBase
/// <param name="frontendBindAddress">The endpoint used to bind the frontend socket.</param>
/// <param name="backendBindAddress">The endpoint used to bind the backend socket.</param>
/// <param name="mode">The <see cref="DeviceMode"/> for the device.</param>
[Obsolete("Use non context version")]
[Obsolete("Use non context version. This will be removed in NetMQ 4.0.")]
public QueueDevice(NetMQContext context, string frontendBindAddress, string backendBindAddress, DeviceMode mode = DeviceMode.Threaded)
: base(context.CreateRouterSocket(), context.CreateDealerSocket(), mode)
{
Expand All @@ -38,7 +38,7 @@ public QueueDevice(NetMQContext context, string frontendBindAddress, string back
/// <param name="frontendBindAddress">The endpoint used to bind the frontend socket.</param>
/// <param name="backendBindAddress">The endpoint used to bind the backend socket.</param>
/// <param name="mode">The <see cref="DeviceMode"/> for the device.</param>
[Obsolete("Use non context version")]
[Obsolete("Use non context version. This will be removed in NetMQ 4.0.")]
public QueueDevice(NetMQContext context, INetMQPoller poller, string frontendBindAddress, string backendBindAddress, DeviceMode mode = DeviceMode.Threaded)
: base(poller, context.CreateRouterSocket(), context.CreateDealerSocket(), mode)
{
Expand Down
4 changes: 2 additions & 2 deletions src/NetMQ/Devices/StreamerDevice.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ public class StreamerDevice : DeviceBase
/// <param name="frontendBindAddress">The endpoint used to bind the frontend socket.</param>
/// <param name="backendBindAddress">The endpoint used to bind the backend socket.</param>
/// <param name="mode">The <see cref="DeviceMode"/> for the device.</param>
[Obsolete("Use non context version")]
[Obsolete("Use non context version. This will be removed in NetMQ 4.0.")]
public StreamerDevice(NetMQContext context, string frontendBindAddress, string backendBindAddress,
DeviceMode mode = DeviceMode.Threaded)
: base(context.CreatePullSocket(), context.CreatePushSocket(), mode)
Expand All @@ -37,7 +37,7 @@ public StreamerDevice(NetMQContext context, string frontendBindAddress, string b
/// <param name="frontendBindAddress">The endpoint used to bind the frontend socket.</param>
/// <param name="backendBindAddress">The endpoint used to bind the backend socket.</param>
/// <param name="mode">The <see cref="DeviceMode"/> for the device.</param>
[Obsolete("Use non context version")]
[Obsolete("Use non context version. This will be removed in NetMQ 4.0.")]
public StreamerDevice(NetMQContext context, INetMQPoller poller, string frontendBindAddress, string backendBindAddress,
DeviceMode mode = DeviceMode.Threaded)
: base(poller, context.CreatePullSocket(), context.CreatePushSocket(), mode)
Expand Down
68 changes: 34 additions & 34 deletions src/NetMQ/ErrorCode.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public enum ErrorCode
/// <summary>
/// The connection is still in progress.
/// </summary>
[Obsolete("Use InProgress")]
[Obsolete("Use InProgress. This will be removed in NetMQ 4.0.")]
InProgres = 36,

/// <summary>
Expand Down Expand Up @@ -148,201 +148,201 @@ public enum ErrorCode
/// <summary>
/// The provided endpoint is not connected.
/// </summary>
[Obsolete("Use EndpointNotFound")]
[Obsolete("Use EndpointNotFound. This will be removed in NetMQ 4.0.")]
ENOENT = 2,

/// <summary>
/// The operation was interrupted by a signal.
/// </summary>
[Obsolete("Not in use")]
[Obsolete("Not in use. This will be removed in NetMQ 4.0.")]
EINTR = 4,

/// <summary>
/// Permission denied
/// </summary>
[Obsolete("Use AccessDenied")]
[Obsolete("Use AccessDenied. This will be removed in NetMQ 4.0.")]
EACCESS = 13,

/// <summary>
/// The provided context is invalid.
/// </summary>
[Obsolete("Use Fault")]
[Obsolete("Use Fault. This will be removed in NetMQ 4.0.")]
EFAULT = 14,

/// <summary>
/// The endpoint supplied is invalid.
/// </summary>
[Obsolete("Use Invalid")]
[Obsolete("Use Invalid. This will be removed in NetMQ 4.0.")]
EINVAL = 22,

/// <summary>
/// Non-blocking mode was requested and the message cannot be sent at the moment.
/// </summary>
[Obsolete("Use TryAgain")]
[Obsolete("Use TryAgain. This will be removed in NetMQ 4.0.")]
EAGAIN = 35,

/// <summary>
/// The connection is still in progress.
/// </summary>
[Obsolete("Use InProgress")]
[Obsolete("Use InProgress. This will be removed in NetMQ 4.0.")]
EINPROGRESS = 36,

/// <summary>
/// The requested transport protocol is not supported.
/// </summary>
[Obsolete("Use ProtocolNotSupported")]
[Obsolete("Use ProtocolNotSupported. This will be removed in NetMQ 4.0.")]
EPROTONOSUPPORT = 43,

/// <summary>
/// That operation is not supported by this socket type.
/// </summary>
[Obsolete("Not in use")]
[Obsolete("Not in use. This will be removed in NetMQ 4.0.")]
ENOTSUP = 45,

/// <summary>
/// The requested address is already in use.
/// </summary>
[Obsolete("Use AddressAlreadyInUse")]
[Obsolete("Use AddressAlreadyInUse. This will be removed in NetMQ 4.0.")]
EADDRINUSE = 48,

/// <summary>
/// The requested address was not available.
/// For Bind operations, that can mean the address was not local.
/// </summary>
[Obsolete("Use AddressNotAvailable")]
[Obsolete("Use AddressNotAvailable. This will be removed in NetMQ 4.0.")]
EADDRNOTAVAIL = 49,

/// <summary>
/// The network appears to be down.
/// </summary>
[Obsolete("Use NetworkDown")]
[Obsolete("Use NetworkDown. This will be removed in NetMQ 4.0.")]
ENETDOWN = 50,

/// <summary>
/// There is not enough buffer space for the requested operation.
/// </summary>
[Obsolete("Use NoBufferSpaceAvailable")]
[Obsolete("Use NoBufferSpaceAvailable. This will be removed in NetMQ 4.0.")]
ENOBUFS = 55,

/// <summary>
/// Unused
/// </summary>
[Obsolete("Not in use")]
[Obsolete("Not in use. This will be removed in NetMQ 4.0.")]
EISCONN = 56,

/// <summary>
/// The socket is not connected.
/// </summary>
[Obsolete("Use NotConnected")]
[Obsolete("Use NotConnected. This will be removed in NetMQ 4.0.")]
ENOTCONN = 57,

/// <summary>
/// The connection was refused.
/// </summary>
[Obsolete("Use ConnectionRefused")]
[Obsolete("Use ConnectionRefused. This will be removed in NetMQ 4.0.")]
ECONNREFUSED = 61,

/// <summary>
/// The host is not reachable.
/// </summary>
[Obsolete("Use HostUnreachable")]
[Obsolete("Use HostUnreachable. This will be removed in NetMQ 4.0.")]
EHOSTUNREACH = 65,

/// <summary>
/// This is the value chosen for beginning the range of 0MQ error codes.
/// </summary>
[Obsolete("Use BaseErrorNumber")]
[Obsolete("Use BaseErrorNumber. This will be removed in NetMQ 4.0.")]
ZMQ_HAUSNUMERO = BaseErrorNumber,

/// <summary>
/// The provided socket was invalid.
/// </summary>
[Obsolete("Not in use")]
[Obsolete("Not in use. This will be removed in NetMQ 4.0.")]
ENOTSOCK = BaseErrorNumber + 9,

/// <summary>
/// The message is too long.
/// </summary>
[Obsolete("Use MessageSize")]
[Obsolete("Use MessageSize. This will be removed in NetMQ 4.0.")]
EMSGSIZE = BaseErrorNumber + 10,

/// <summary>
/// The address family is not supported by this protocol.
/// </summary>
[Obsolete("Use AddressFamilyNotSupported")]
[Obsolete("Use AddressFamilyNotSupported. This will be removed in NetMQ 4.0.")]
EAFNOSUPPORT = BaseErrorNumber + 11,

/// <summary>
/// The network is apparently not reachable.
/// </summary>
[Obsolete("Use NetworkUnreachable")]
[Obsolete("Use NetworkUnreachable. This will be removed in NetMQ 4.0.")]
ENETUNREACH = BaseErrorNumber + 12,

/// <summary>
/// The connection-attempt has apparently been aborted.
/// </summary>
[Obsolete("Use ConnectionAborted")]
[Obsolete("Use ConnectionAborted. This will be removed in NetMQ 4.0.")]
ECONNABORTED = BaseErrorNumber + 13,

/// <summary>
/// The connection has apparently been reset.
/// </summary>
[Obsolete("Use ConnectionReset")]
[Obsolete("Use ConnectionReset. This will be removed in NetMQ 4.0.")]
ECONNRESET = BaseErrorNumber + 14,

/// <summary>
/// The operation timed-out.
/// </summary>
[Obsolete("Use TimedOut")]
[Obsolete("Use TimedOut. This will be removed in NetMQ 4.0.")]
ETIMEDOUT = BaseErrorNumber + 16,

/// <summary>
/// The network was reset.
/// </summary>
[Obsolete("Use NetworkReset")]
[Obsolete("Use NetworkReset. This will be removed in NetMQ 4.0.")]
ENETRESET = BaseErrorNumber + 18,

/// <summary>
/// The operation cannot be performed on this socket at the moment due
/// to the socket not being in the appropriate state.
/// </summary>
[Obsolete("Use FiniteStateMachine")]
[Obsolete("Use FiniteStateMachine. This will be removed in NetMQ 4.0.")]
EFSM = BaseErrorNumber + 51,

/// <summary>
/// The requested transport protocol is not compatible with the socket type.
/// </summary>
[Obsolete("Not in use")]
[Obsolete("Not in use. This will be removed in NetMQ 4.0.")]
ENOCOMPATPROTO = BaseErrorNumber + 52,

/// <summary>
/// The context associated with the specified socket has already been terminated.
/// </summary>
[Obsolete("Use ContextTerminated")]
[Obsolete("Use ContextTerminated. This will be removed in NetMQ 4.0.")]
ETERM = BaseErrorNumber + 53,

/// <summary>
/// No I/O thread is available to accomplish this task.
/// </summary>
[Obsolete("Use EmptyThread")]
[Obsolete("Use EmptyThread. This will be removed in NetMQ 4.0.")]
EMTHREAD = BaseErrorNumber + 54,

/// <summary>
/// Unused
/// </summary>
[Obsolete("Not In Use")]
[Obsolete("Not In Use. This will be removed in NetMQ 4.0.")]
EIOEXC = BaseErrorNumber + 105,

/// <summary>
/// Unused
/// </summary>
[Obsolete]
[Obsolete("This will be removed in NetMQ 4.0.")]
ESOCKET = BaseErrorNumber + 106,

/// <summary>
/// Too many sockets for this process.
/// </summary>
[Obsolete("Use TooManyOpenSockets")]
[Obsolete("Use TooManyOpenSockets. This will be removed in NetMQ 4.0.")]
EMFILE = BaseErrorNumber + 107
}
}
2 changes: 1 addition & 1 deletion src/NetMQ/ErrorPollingException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ namespace NetMQ
/// ErrorPollingException is an Exception that had been used within the message-queueing system to signal polling-related errors.
/// Use one of the NetMQException-derived exception classes instead.
/// </summary>
[Obsolete]
[Obsolete("This exception is unused in NetMQ and will be removed in NetMQ 4.0.")]
public class ErrorPollingException : Exception
{
/// <summary>
Expand Down
Loading

0 comments on commit 5bd0807

Please sign in to comment.