Xafari Context Service. Initialization
There is no need to call the Initialize() method explicitly when implementing context services.
To initialize context object, it is required to override ServiceSpaceContextBase.InitializeCore() protected virtual method. Use this method to implement complex initialization operations, for instance, it may be an access to the Model Service. The code below demonstrates the InitializeCore() method of the Numerators service, in addition to the base functionality, it initialize the AutoApply property which gets default value from the service object.
protected override void InitializeCore()
this.AutoApply = this.Service.AutoApply;
Protected Overrides Sub InitializeCore()
Me.AutoApply = Me.Service.AutoApply
The ServiceSpaceContextCreated service event is generated after the Initialize() method is called.