public static ZMonitor Create(ZContext context, string endpoint) { ZError error; ZMonitor monitor; if (null == (monitor = ZMonitor.Create(context, endpoint, out error))) { throw new ZException(error); } return(monitor); }
internal ZMonitorFileDescriptorEventArgs(ZMonitor monitor, ZMonitorEventData data) : base(monitor, data) { if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) { FileDescriptor_Posix = data.EventValue; } else if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) { FileDescriptor_Windows = new IntPtr(data.EventValue); } else { throw new PlatformNotSupportedException(); } }
internal ZMonitorFileDescriptorEventArgs(ZMonitor monitor, ZMonitorEventData data) : base(monitor, data) { if (Platform.Kind == PlatformKind.Posix) { this.FileDescriptor_Posix = data.EventValue; } else if (Platform.Kind == PlatformKind.Win32) { this.FileDescriptor_Windows = new IntPtr(data.EventValue); } else { throw new PlatformNotSupportedException(); } }
/// <summary> /// Initializes a new instance of the <see cref="ZMonitorEventArgs"/> class. /// </summary> /// <param name="monitor">The <see cref="ZMonitor"/> that triggered the event.</param> /// <param name="address">The peer address.</param> public ZMonitorEventArgs(ZMonitor monitor, ZMonitorEventData ed) { this.Monitor = monitor; this.Event = ed; }
/// <summary> /// Initializes a new instance of the <see cref="ZMonitorEventArgs"/> class. /// </summary> /// <param name="monitor">The <see cref="ZMonitor"/> that triggered the event.</param> /// <param name="address">The peer address.</param> public ZMonitorEventArgs(ZMonitor monitor, ZMonitorEventData ed) { Monitor = monitor; Event = ed; }