1
1
using System ;
2
2
using System . Net . Sockets ;
3
3
using System . Runtime . Serialization ;
4
-
5
- #if ! NETSTANDARD1_6
6
4
using System . Security . Permissions ;
7
- #endif
8
-
9
5
using NetMQ . Core ;
10
6
11
7
namespace NetMQ
12
8
{
13
9
/// <summary>
14
10
/// Base class for custom exceptions within the NetMQ library.
15
11
/// </summary>
16
- #if ! NETSTANDARD1_6
17
12
[ Serializable ]
18
- #endif
19
13
public class NetMQException : Exception
20
14
{
21
15
/// <summary>
@@ -50,8 +44,6 @@ public NetMQException(string message, Exception innerException)
50
44
: base ( message , innerException )
51
45
{ }
52
46
53
- #if ! NETSTANDARD1_6
54
-
55
47
/// <summary>Constructor for serialisation.</summary>
56
48
protected NetMQException ( SerializationInfo info , StreamingContext context )
57
49
: base ( info , context )
@@ -67,8 +59,6 @@ public override void GetObjectData(SerializationInfo info, StreamingContext cont
67
59
base . GetObjectData ( info , context ) ;
68
60
}
69
61
70
- #endif
71
-
72
62
#endregion
73
63
74
64
/// <summary>
@@ -182,9 +172,7 @@ private static NetMQException Create(ErrorCode errorCode, string? message, Excep
182
172
/// <summary>
183
173
/// AddressAlreadyInUseException is a NetMQException that is used within SocketBase.Bind to signal an address-conflict.
184
174
/// </summary>
185
- #if ! NETSTANDARD1_6
186
175
[ Serializable ]
187
- #endif
188
176
public class AddressAlreadyInUseException : NetMQException
189
177
{
190
178
/// <summary>
@@ -206,21 +194,17 @@ public AddressAlreadyInUseException(string? message)
206
194
{
207
195
}
208
196
209
- #if ! NETSTANDARD1_6
210
197
/// <summary>Constructor for serialisation.</summary>
211
198
protected AddressAlreadyInUseException ( SerializationInfo info , StreamingContext context )
212
199
: base ( info , context )
213
200
{
214
201
}
215
- #endif
216
202
}
217
203
218
204
/// <summary>
219
205
/// EndpointNotFoundException is a NetMQException that is used within Ctx.FindEndpoint to signal a failure to find a specified address.
220
206
/// </summary>
221
- #if ! NETSTANDARD1_6
222
207
[ Serializable ]
223
- #endif
224
208
public class EndpointNotFoundException : NetMQException
225
209
{
226
210
/// <summary>
@@ -250,22 +234,18 @@ public EndpointNotFoundException()
250
234
{
251
235
}
252
236
253
- #if ! NETSTANDARD1_6
254
237
/// <summary>Constructor for serialisation.</summary>
255
238
protected EndpointNotFoundException ( SerializationInfo info , StreamingContext context )
256
239
: base ( info , context )
257
240
{
258
241
}
259
- #endif
260
242
}
261
243
262
244
/// <summary>
263
245
/// TerminatingException is a NetMQException that is used within SocketBase and Ctx to signal
264
246
/// that you're making the mistake of trying to do further work after terminating the message-queueing system.
265
247
/// </summary>
266
- #if ! NETSTANDARD1_6
267
248
[ Serializable ]
268
- #endif
269
249
public class TerminatingException : NetMQException
270
250
{
271
251
/// <summary>
@@ -294,21 +274,18 @@ internal TerminatingException()
294
274
: this ( null , null )
295
275
{
296
276
}
297
- #if ! NETSTANDARD1_6
277
+
298
278
/// <summary>Constructor for serialisation.</summary>
299
279
protected TerminatingException ( SerializationInfo info , StreamingContext context )
300
280
: base ( info , context )
301
281
{
302
282
}
303
- #endif
304
283
}
305
284
306
285
/// <summary>
307
286
/// InvalidException is a NetMQException that is used within the message-queueing system to signal invalid value errors.
308
287
/// </summary>
309
- #if ! NETSTANDARD1_6
310
288
[ Serializable ]
311
- #endif
312
289
public class InvalidException : NetMQException
313
290
{
314
291
/// <summary>
@@ -337,21 +314,18 @@ public InvalidException()
337
314
: this ( null , null )
338
315
{
339
316
}
340
- #if ! NETSTANDARD1_6
317
+
341
318
/// <summary>Constructor for serialisation.</summary>
342
319
protected InvalidException ( SerializationInfo info , StreamingContext context )
343
320
: base ( info , context )
344
321
{
345
322
}
346
- #endif
347
323
}
348
324
349
325
/// <summary>
350
326
/// FaultException is a NetMQException that is used within the message-queueing system to signal general fault conditions.
351
327
/// </summary>
352
- #if ! NETSTANDARD1_6
353
328
[ Serializable ]
354
- #endif
355
329
public class FaultException : NetMQException
356
330
{
357
331
/// <summary>
@@ -380,22 +354,19 @@ public FaultException()
380
354
: this ( null , null )
381
355
{
382
356
}
383
- #if ! NETSTANDARD1_6
357
+
384
358
/// <summary>Constructor for serialisation.</summary>
385
359
protected FaultException ( SerializationInfo info , StreamingContext context )
386
360
: base ( info , context )
387
361
{
388
362
}
389
- #endif
390
363
}
391
364
392
365
/// <summary>
393
366
/// ProtocolNotSupportedException is a NetMQException that is used within the message-queueing system to signal
394
367
/// mistakes in properly utilizing the communications protocols.
395
368
/// </summary>
396
- #if ! NETSTANDARD1_6
397
369
[ Serializable ]
398
- #endif
399
370
public class ProtocolNotSupportedException : NetMQException
400
371
{
401
372
/// <summary>
@@ -424,22 +395,19 @@ public ProtocolNotSupportedException()
424
395
: this ( null , null )
425
396
{
426
397
}
427
- #if ! NETSTANDARD1_6
398
+
428
399
/// <summary>Constructor for serialisation.</summary>
429
400
protected ProtocolNotSupportedException ( SerializationInfo info , StreamingContext context )
430
401
: base ( info , context )
431
402
{
432
403
}
433
- #endif
434
404
}
435
405
436
406
/// <summary>
437
407
/// HostUnreachableException is an Exception that is used within the message-queueing system
438
408
/// to signal failures to communicate with a host.
439
409
/// </summary>
440
- #if ! NETSTANDARD1_6
441
410
[ Serializable ]
442
- #endif
443
411
public class HostUnreachableException : NetMQException
444
412
{
445
413
/// <summary>
@@ -468,22 +436,19 @@ public HostUnreachableException()
468
436
: this ( null , null )
469
437
{
470
438
}
471
- #if ! NETSTANDARD1_6
439
+
472
440
/// <summary>Constructor for serialisation.</summary>
473
441
protected HostUnreachableException ( SerializationInfo info , StreamingContext context )
474
442
: base ( info , context )
475
443
{
476
444
}
477
- #endif
478
445
}
479
446
480
447
/// <summary>
481
448
/// FiniteStateMachineException is an Exception that is used within the message-queueing system
482
449
/// to signal errors in the send/receive order with request/response sockets.
483
450
/// </summary>
484
- #if ! NETSTANDARD1_6
485
451
[ Serializable ]
486
- #endif
487
452
public class FiniteStateMachineException : NetMQException
488
453
{
489
454
/// <summary>
@@ -512,12 +477,11 @@ public FiniteStateMachineException()
512
477
: this ( null , null )
513
478
{
514
479
}
515
- #if ! NETSTANDARD1_6
480
+
516
481
/// <summary>Constructor for serialisation.</summary>
517
482
protected FiniteStateMachineException ( SerializationInfo info , StreamingContext context )
518
483
: base ( info , context )
519
484
{
520
485
}
521
- #endif
522
486
}
523
487
}
0 commit comments