/// <summary> /// Gets the registration status. /// </summary> /// <param name="feature">The feature.</param> /// <param name="mb2Equivalent">The MB2 equivalent.</param> /// <returns>Task{MBRegistrationRecord}.</returns> public async Task <MBRegistrationRecord> GetRegistrationStatus(string feature, string mb2Equivalent = null) { // Do this on demend instead of in the constructor to delay the external assembly load // Todo: Refactor external methods to take app paths as a param MBRegistration.Init(_applciationPaths, _networkManager); return(await MBRegistration.GetRegistrationStatus(_httpClient, _jsonSerializer, feature, mb2Equivalent).ConfigureAwait(false)); }
/// <summary> /// Initializes a new instance of the <see cref="PluginSecurityManager" /> class. /// </summary> public PluginSecurityManager(IApplicationHost appHost, IHttpClient httpClient, IJsonSerializer jsonSerializer, IApplicationPaths appPaths) { if (httpClient == null) { throw new ArgumentNullException("httpClient"); } _appHost = appHost; _httpClient = httpClient; _jsonSerializer = jsonSerializer; MBRegistration.Init(appPaths); }
/// <summary> /// Initializes a new instance of the <see cref="PluginSecurityManager" /> class. /// </summary> public PluginSecurityManager(IApplicationHost appHost, IHttpClient httpClient, IJsonSerializer jsonSerializer, IApplicationPaths appPaths, INetworkManager networkManager, ILogManager logManager) { if (httpClient == null) { throw new ArgumentNullException("httpClient"); } _applciationPaths = appPaths; _networkManager = networkManager; _appHost = appHost; _httpClient = httpClient; _jsonSerializer = jsonSerializer; MBRegistration.Init(_applciationPaths, _networkManager, logManager, _appHost); }