示例#1
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="publisher"></param>
        /// <param name="streamNames"></param>
        public static void Unsubscribe(this IJsonPublisher publisher, IEnumerable <string> streamNames)
        {
            Throw.IfNull(streamNames, nameof(streamNames));

            Unsubscribe(publisher, streamNames.ToArray());
        }
示例#2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="publisher"></param>
        /// <param name="streamNames"></param>
        public static void Unsubscribe(this IJsonPublisher publisher, params string[] streamNames)
        {
            Throw.IfNull(publisher, nameof(publisher));

            publisher.Unsubscribe(null, streamNames);
        }
示例#3
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="publisher"></param>
        /// <param name="subscriber"></param>
        public static void Unsubscribe(this IJsonPublisher publisher, IJsonSubscriber subscriber)
        {
            Throw.IfNull(publisher, nameof(publisher));

            publisher.Unsubscribe(subscriber, null);
        }
示例#4
0
        /// <summary>
        /// Determine if a symbol supports a client order type.
        /// </summary>
        /// <param name="symbol"></param>
        /// <param name="order"></param>
        /// <returns></returns>
        public static bool IsOrderTypeSupported(this Symbol symbol, ClientOrder order)
        {
            Throw.IfNull(order, nameof(order));

            return(IsSupported(symbol, order.Type));
        }
示例#5
0
        /// <summary>
        /// Determine if a symbol supports an order type.
        /// </summary>
        /// <param name="symbol"></param>
        /// <param name="orderType"></param>
        /// <returns></returns>
        public static bool IsSupported(this Symbol symbol, OrderType orderType)
        {
            Throw.IfNull(symbol, nameof(symbol));

            return(symbol.OrderTypes.Contains(orderType));
        }
示例#6
0
        /// <summary>
        /// Constructor.
        /// </summary>
        /// <param name="exception">The exception (required).</param>
        public ErrorEventArgs(Exception exception)
        {
            Throw.IfNull(exception, nameof(exception));

            Exception = exception;
        }