C# Class Drey.Configuration.Services.GlobalSettingsService

Inheritance: System.MarshalByRefObject, IGlobalSettingsService
Show file Open project: dealproc/Drey

Public Methods

Method Description
GetCertificate ( ) : X509Certificate2

Gets the certificate from the Global Settings store.

GetHttpClient ( ) : HttpClient

Manufacturers an Http Client with default values.

GetServerHostname ( ) : ServerHostnamePmo

Gets the server hostname from the Global Settings store.

GlobalSettingsService ( IGlobalSettingsRepository globalSettingsRepository ) : Drey.Configuration.Repositories

Initializes a new instance of the GlobalSettingsService class.

HasValidSettings ( ) : bool

Determines whether the global settings are valid or not.

StoreSettings ( ViewModels settings ) : bool

Stores the initial settings in the Global Settings store. This method should only be used for a new deployment. Updates to settings should be done via the UpdateServerHostname/UpdateSSLCertificate method(s)

UpdateClientCertificate ( byte cert ) : void

Updates the SSL certificate in the Global Settings store.

UpdateHostDetails ( ViewModels pmo ) : void

Updates the server hostname in the Global Settings store.

Method Details

GetCertificate() public method

Gets the certificate from the Global Settings store.
public GetCertificate ( ) : X509Certificate2
return System.Security.Cryptography.X509Certificates.X509Certificate2

GetHttpClient() public method

Manufacturers an Http Client with default values.
public GetHttpClient ( ) : HttpClient
return System.Net.Http.HttpClient

GetServerHostname() public method

Gets the server hostname from the Global Settings store.
public GetServerHostname ( ) : ServerHostnamePmo
return Drey.Configuration.Services.ViewModels.ServerHostnamePmo

GlobalSettingsService() public method

Initializes a new instance of the GlobalSettingsService class.
public GlobalSettingsService ( IGlobalSettingsRepository globalSettingsRepository ) : Drey.Configuration.Repositories
globalSettingsRepository IGlobalSettingsRepository The global settings repository.
return Drey.Configuration.Repositories

HasValidSettings() public method

Determines whether the global settings are valid or not.
public HasValidSettings ( ) : bool
return bool

StoreSettings() public method

Stores the initial settings in the Global Settings store. This method should only be used for a new deployment. Updates to settings should be done via the UpdateServerHostname/UpdateSSLCertificate method(s)
public StoreSettings ( ViewModels settings ) : bool
settings ViewModels The settings.
return bool

UpdateClientCertificate() public method

Updates the SSL certificate in the Global Settings store.
cert
public UpdateClientCertificate ( byte cert ) : void
cert byte The cert.
return void

UpdateHostDetails() public method

Updates the server hostname in the Global Settings store.
public UpdateHostDetails ( ViewModels pmo ) : void
pmo ViewModels
return void