Exemple #1
0
        internal PrivateSession(PrivateClient client, PrivateAuthentication auth, IOptions <SessionOptions> options) : base(client, auth, DetermineAuthMethodFactory(client, auth), options)
        {
            Cache = new ProxyMemoryCache <PrivateAuthentication>(client.Cache, auth);

            var settings = client.ServerSettings as PrivateServerSettings.IExtraSettings;

            HttpClientHandlerFactory = (settings == null || settings.HttpClientHandlerFactory == null)
                ? () => new HttpClientHandler()
                : settings.HttpClientHandlerFactory;

            if (options != null && options.Value.LoggerFactory != null)
            {
                SessionLogger = options.Value.LoggerFactory.CreateLogger <PrivateSession>();
            }

            Logger.LogDebug("Initialising session");
        }
 internal PrivateSession(PrivateClient client, PrivateAuthentication auth) : base(client, auth, DetermineAuthMethodFactory(client, auth))
 {
     Cache = new ProxyMemoryCache <PrivateAuthentication>(client.Cache, auth);
 }