示例#1
0
        /// <summary>
        /// Combine <see cref="HttpCallMessage"/> with <see cref="HttpCallConfiguration"/> and <see cref="HttpCallAttribute"/>
        /// </summary>
        /// <param name="message"></param>
        /// <param name="config"></param>
        /// <param name="attr"></param>
        /// <returns></returns>
        private static SignalRMessage MergeMessageProperties(SignalRMessage message, SignalRConfiguration config, SignalRAttribute attr)
        {
            var result = new SignalRMessage
            {
                Arguments = message.Arguments,
                Groups    = Utils.MergeValueForProperty(message.Groups, Utils.CreateListFrom(config.Groups), Utils.CreateListFrom(attr.Groups)),
                Users     = Utils.MergeValueForProperty(message.Users, Utils.CreateListFrom(attr.Users)),
                Hub       = Utils.MergeValueForProperty(message.Hub, config.Hub, attr.Hub),
                Target    = Utils.MergeValueForProperty(message.Target, config.Target, attr.Target),
            };


            return(result);
        }
示例#2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="config"></param>
 /// <param name="attr"></param>
 /// <param name="httpClientFactory"></param>
 public SignalRAsyncCollector(SignalRConfiguration config, SignalRAttribute attr, IHttpClientFactory httpClientFactory)
 {
     this.config            = config;
     this.attr              = attr;
     this.httpClientFactory = httpClientFactory;
 }
示例#3
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="config"></param>
 /// <param name="attr"></param>
 public SignalRAsyncCollector(SignalRConfiguration config, SignalRAttribute attr) : this(config, attr, HttpClientFactory.Instance)
 {
 }