public static void Startup() { SnapInContext.Instance.AuthTokenManager = new AuthTokenManager(); var filePath = Path.Combine(SnapInContext.Instance.ApplicationPath, Constants.LocalStorageFileName); _store = new LocalFileStorage(filePath); SnapInContext.Instance.AuthTokenManager.CacheAuthTokens(_store.Load()); var httpTransportFilePath = Path.Combine(SnapInContext.Instance.ApplicationPath, Constants.HttpTransportLocalStorageFileName); _httpTransportStore = new HttpTransportLocalFileStorage(httpTransportFilePath); var httpData = _httpTransportStore.Load(); var service = SnapInContext.Instance.ServiceGateway; service.HttpTransport.SetAll(httpData); }
public void Startup() { SnapInContext.Instance.AuthTokenManager = new AuthTokenManager(); var filePath = Path.Combine(SnapInContext.Instance.ApplicationPath, Constants.LocalStorageFileName); _store = new LocalFileStorage(filePath); SnapInContext.Instance.AuthTokenManager.CacheAuthTokens(_store.Load()); var httpTransportFilePath = Path.Combine(SnapInContext.Instance.ApplicationPath, Constants.HttpTransportLocalStorageFileName); _httpTransportStore = new HttpTransportLocalFileStorage(httpTransportFilePath); var httpData = _httpTransportStore.Load(); var service = SnapInContext.Instance.ServiceGateway; service.HttpTransport.SetAll(httpData); }
public void Startup() { SnapInContext.Instance.AuthTokenManager = new AuthTokenManager(); var filePath = Path.Combine(SnapInContext.Instance.ApplicationPath, Constants.LocalStorageFileName); _store = new LocalFileStorage(filePath); SnapInContext.Instance.AuthTokenManager.CacheAuthTokens(_store.Load()); var httpTransportFilePath = Path.Combine(SnapInContext.Instance.ApplicationPath, Constants.HttpTransportLocalStorageFileName); _httpTransportStore = new HttpTransportLocalFileStorage(httpTransportFilePath); var httpData = _httpTransportStore.Load(); var service = ScopeNodeExtensions.GetServiceGateway(); service.HttpTransport.SetAll(httpData); ServicePointManager.SecurityProtocol = SecurityProtocolType.Ssl3 | SecurityProtocolType.Tls12; }