public AuthenticationService( IOptions <PlayFabConfiguration> options, ILogger <AuthenticationService> logger, IHttpContextAccessor httpContextAccessor) { config = options.Value; this.logger = logger; this.httpContextAccessor = httpContextAccessor; if (string.IsNullOrEmpty(PlayFabSettings.staticSettings.TitleId)) { PlayFabSettings.staticSettings.TitleId = config.TitleId; } }
public PlayFabService( PlayFabConfiguration configuration, IMemoryCache memoryCache, IHttpContextAccessor httpContextAccessor = null) { this.configuration = configuration; cache = memoryCache; cacheEntryOptions = new MemoryCacheEntryOptions() .SetPriority(CacheItemPriority.NeverRemove); cache.Set(CacheKeys.StoreVersion, "0", cacheEntryOptions); this.httpContextAccessor = httpContextAccessor; if (string.IsNullOrWhiteSpace(PlayFabSettings.staticSettings.TitleId)) { PlayFabSettings.staticSettings.TitleId = configuration.TitleId; } if (string.IsNullOrWhiteSpace(PlayFabSettings.staticSettings.DeveloperSecretKey)) { PlayFabSettings.staticSettings.DeveloperSecretKey = configuration.DeveloperSecretKey; } }