C# Class CK.Plugins.ObjectExplorer.ViewModels.LogViewModels.VMLogConfig

Inheritance: VMISelectableElement, ILogConfig
Show file Open project: Invenietis/ck-certified Class Usage Examples

Private Properties

Property Type Description
Apply void
CancelAllModifications void
CancelModifications void
ClearConfig void
EventRegistration void
FillFromDiscoverer void
OnLogConfigChanged void
OnLogServiceConfigChanged void
OnLogTriggered void
OnNewPluginsLoaded void
OnServiceCancelModificationsAsked void
OnServiceDeletionAsked void
OnServiceLogConfigChanged void
OnServiceModificationAsked void
ServiceApply void
UpdateFrom void
UpdateFrom void
UpdateFromHostConfiguration void

Public Methods

Method Description
Find ( string name ) : VMLogServiceConfig

Returns the VMLogServiceConfig corresponding to the name set as parameter

Initialize ( ) : void

Launches Initialization of the VMLogConfig

VMLogConfig ( VMIContextViewModel ctx, ILogService logService ) : System

Instanciates a VMLogConfig, without populating it you can populate it by calling its Initialize() method

Private Methods

Method Description
Apply ( ) : void

This methods calls the interceptor's Apply method

CancelAllModifications ( ) : void

Clears the whole config and updates it from the kernel's configuration

CancelModifications ( VMLogServiceConfig vmS ) : void

Cancels modifications on a particular service if the service is bound or is not bound but can be found in the kernel's configuration, clears it and updates it from the kernel's configuration if the service is not bound, and can't be found in the kernel's configuration, removes it

ClearConfig ( ) : void

Sets back an "after InitializeFromLoader" state - state in which we only have empty bound services/methods/events/properties removes every unbound service.

EventRegistration ( VMLogServiceConfig s ) : void

Registers the config to the event from the vmLogServiceConfig it needs to listen to

FillFromDiscoverer ( ObservableCollection services ) : void

Initializes the VMLogConfig from Loader info

OnLogConfigChanged ( object sender, EventArgs e ) : void

Called when the log configuration of the Kernel has changed Launches UpdateFromKernel

OnLogServiceConfigChanged ( object sender, EventArgs e ) : void

OnLogTriggered ( object sender, LogTriggeredEventArgs e ) : void

Pushes logs into the output console

OnNewPluginsLoaded ( object sender, EventArgs e ) : void

Launches Initialize() when the loader has been re-loaded

OnServiceCancelModificationsAsked ( object sender, EventArgs e ) : void

Cancels modifications on a given Service

OnServiceDeletionAsked ( object sender, EventArgs e ) : void

Deletes the unbound VMLogServiceConfig that has sent the ServiceDeletionAsked event

OnServiceLogConfigChanged ( object sender, PropertyChangedEventArgs e ) : void

Called when something changes in one of the services Tells the view to refresh the LogConfig's IsDirty Property, to show that The config is dirty when one of its service is dirty.

OnServiceModificationAsked ( object sender, EventArgs e ) : void

Similiar to a GoTo, after the method is called, the UI presents the Service UI that sent the ServiceModifictionAsked event

ServiceApply ( VMLogServiceConfig service ) : void

Called when a service wants its log configuration to be applied to the interceptor's configuration

UpdateFrom ( ILogConfig l, bool trackChanges ) : void

Updates all VMLogServiceConfig to reflect the Log configuration set as parameter If this method if called in response to a ConfigCanged from the interceptor, we don't track changes If this method is called in response to a LoadXMLConfig, we do track changes

UpdateFrom ( IPluginConfigAccessor config ) : void
UpdateFromHostConfiguration ( ) : void

Clears the whole log configuration and pastes the Kernel's log configuration

Method Details

Find() public method

Returns the VMLogServiceConfig corresponding to the name set as parameter
public Find ( string name ) : VMLogServiceConfig
name string
return VMLogServiceConfig

Initialize() public method

Launches Initialization of the VMLogConfig
public Initialize ( ) : void
return void

VMLogConfig() public method

Instanciates a VMLogConfig, without populating it you can populate it by calling its Initialize() method
public VMLogConfig ( VMIContextViewModel ctx, ILogService logService ) : System
ctx VMIContextViewModel
logService ILogService
return System