/// <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); }
/// <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; }
/// <summary> /// Constructor /// </summary> /// <param name="config"></param> /// <param name="attr"></param> public SignalRAsyncCollector(SignalRConfiguration config, SignalRAttribute attr) : this(config, attr, HttpClientFactory.Instance) { }