public static async Task <IHubConnectionBuilder> WithUrl(this IHubConnectionBuilder builder, Uri url, string email, string password, Action <HttpConnectionOptions> configureHttpConnection = null) { var cookies = await Login(email, password); return(builder.WithUrl(url, options => { options.Cookies.Add(cookies); configureHttpConnection?.Invoke(options); })); }
HubConnection DefaultConnectionBuilder(string route, IHubConnectionBuilder builder) { builder = builder.WithUrl(route, ConfigureOptions); if (AutoReconnect) { builder.WithAutomaticReconnect(); } if (ConfigureLogging != null) { builder.ConfigureLogging(ConfigureLogging); } return(builder.Build()); }
public SignalRService( IHubConnectionBuilder hubConnectionBuilder, PinService pinService, QueuePollerService queuePollerService, ILogger <SignalRService> logger) { hubConnectionBuilder.WithUrl("http://localhost/pinponhub"); connection = hubConnectionBuilder.Build(); this.pinService = pinService; this.queuePollerService = queuePollerService; this.logger = logger; }
public static IHubConnectionBuilder WithQuery(this IHubConnectionBuilder hubConnectionBuilder, string url, IHubRequestFilter filter, HttpTransportType transports, Action <HttpConnectionOptions> configureHttpConnection) { return(hubConnectionBuilder.WithUrl($"{url}?{HubConstants.HubQueryFilter}={filter.GroupId}", transports, configureHttpConnection)); }
public static IHubConnectionBuilder WithQuery(this IHubConnectionBuilder hubConnectionBuilder, string url, IHubRequestFilter filter) { return(hubConnectionBuilder.WithUrl($"{url}?{HubConstants.HubQueryFilter}={filter.GroupId}")); }