public IDxSubscription CreateIncOrderSnapshotSubscription(IDxIncOrderSnapshotListener listener) { if (handle == IntPtr.Zero) { throw new NativeDxException("not connected"); } IDxSubscription result = new NativeSnapshotSubscription(this, listener); subscriptions.Add(result); return(result); }
/// <summary> /// Creates a snapshot subscription /// </summary> /// <remarks> /// Don't call this method inside any listeners and callbacks of NativeSubscription, NativeConnection, /// NativeRegionalBook, NativeSnapshotSubscription classes /// </remarks> /// <param name="eventType">Single event type.</param> /// <param name="time">Time in the past - number of milliseconds from 1.1.1970 (unix time)</param> /// <param name="listener">snapshot listener callback</param> /// <returns>subscription object</returns> /// <exception cref="DxException"></exception> public IDxSubscription CreateSnapshotSubscription(EventType eventType, long time, IDxSnapshotListener listener) { if (handle == IntPtr.Zero) { throw new NativeDxException("not connected"); } IDxSubscription result = new NativeSnapshotSubscription(this, eventType, time, listener); subscriptions.Add(result); return(result); }
/// <summary> /// Creates a snapshot subscription /// </summary> /// <remarks> /// Don't call this method inside any listeners and callbacks of NativeSubscription, NativeConnection, /// NativeRegionalBook, NativeSnapshotSubscription classes /// </remarks> /// <param name="time">Date time in the past</param> /// <param name="listener">snapshot listener callback</param> /// <returns>subscription object</returns> /// <exception cref="DxException"></exception> public IDxSubscription CreateSnapshotSubscription(DateTime?time, IDxSnapshotListener listener) { if (handle == IntPtr.Zero) { throw new NativeDxException("not connected"); } var unixTime = time == null ? 0 : Tools.DateToUnixTime((DateTime)time); IDxSubscription result = new NativeSnapshotSubscription(this, unixTime, listener); subscriptions.Add(result); return(result); }