public static TransportType GetTransport(this IHubConnectionBuilder hubConnectionBuilder)
        {
            if (hubConnectionBuilder.TryGetSetting <TransportType>(TransportTypeKey, out var transportType))
            {
                return(transportType);
            }

            return(TransportType.All);
        }
        public static X509CertificateCollection GetClientCertificates(this IHubConnectionBuilder hubConnectionBuilder)
        {
            if (hubConnectionBuilder.TryGetSetting <X509CertificateCollection>(ClientCertificatesKey, out var clientCertificates))
            {
                return(clientCertificates);
            }

            return(null);
        }
        public static Func <string> GetAccessTokenFactory(this IHubConnectionBuilder hubConnectionBuilder)
        {
            if (hubConnectionBuilder.TryGetSetting <Func <string> >(AccessTokenFactoryKey, out var factory))
            {
                return(factory);
            }

            return(null);
        }
        public static ICredentials GetCredentials(this IHubConnectionBuilder hubConnectionBuilder)
        {
            if (hubConnectionBuilder.TryGetSetting <ICredentials>(CredentialsKey, out var credentials))
            {
                return(credentials);
            }

            return(null);
        }
        public static CookieContainer GetCookies(this IHubConnectionBuilder hubConnectionBuilder)
        {
            if (hubConnectionBuilder.TryGetSetting <CookieContainer>(CookiesKey, out var cookies))
            {
                return(cookies);
            }

            return(null);
        }
        public static bool?GetUseDefaultCredentials(this IHubConnectionBuilder hubConnectionBuilder)
        {
            if (hubConnectionBuilder.TryGetSetting <bool?>(UseDefaultCredentialsKey, out var useDefaultCredentials))
            {
                return(useDefaultCredentials);
            }

            return(null);
        }
        public static IWebProxy GetProxy(this IHubConnectionBuilder hubConnectionBuilder)
        {
            if (hubConnectionBuilder.TryGetSetting <IWebProxy>(ProxyKey, out var proxy))
            {
                return(proxy);
            }

            return(null);
        }
        public static IDictionary <string, string> GetHeaders(this IHubConnectionBuilder hubConnectionBuilder)
        {
            if (hubConnectionBuilder.TryGetSetting <IDictionary <string, string> >(HeadersKey, out var headers))
            {
                return(headers);
            }

            return(null);
        }
Ejemplo n.º 9
0
 public static IHubProtocol GetHubProtocol(this IHubConnectionBuilder hubConnectionBuilder)
 {
     hubConnectionBuilder.TryGetSetting <IHubProtocol>(HubConnectionBuilderDefaults.HubProtocolKey, out var hubProtocol);
     return(hubProtocol);
 }
Ejemplo n.º 10
0
 public static ILoggerFactory GetLoggerFactory(this IHubConnectionBuilder hubConnectionBuilder)
 {
     hubConnectionBuilder.TryGetSetting <ILoggerFactory>(HubConnectionBuilderDefaults.LoggerFactoryKey, out var loggerFactory);
     return(loggerFactory);
 }
 public static Action <ClientWebSocketOptions> GetWebSocketOptions(this IHubConnectionBuilder hubConnectionBuilder)
 {
     hubConnectionBuilder.TryGetSetting <Action <ClientWebSocketOptions> >(WebSocketOptionsKey, out var webSocketOptions);
     return(webSocketOptions);
 }
 public static HttpMessageHandler GetMessageHandler(this IHubConnectionBuilder hubConnectionBuilder)
 {
     hubConnectionBuilder.TryGetSetting <HttpMessageHandler>(HttpMessageHandlerKey, out var messageHandler);
     return(messageHandler);
 }