/*=========================*/ #endregion #region Constructor /*=========================*/ /// <summary> /// /// </summary> internal ServiceInstance(ActiveServiceElement activeConfiguration, ServiceInstance parentInstance, int accountID) { ActiveConfigurationProperty.SetValue(this, activeConfiguration); ParentInstanceProperty.SetValue(this, parentInstance); if (accountID > -1) { AccountIDProperty.SetValue(this, accountID); } _childStateHandler = new EventHandler <ServiceStateChangedEventArgs>(ChildStateChanged); _childOutcomeHandler = new EventHandler(ChildOutcomeReported); Log = new Log(this); }
/*=========================*/ #endregion #region Constructor /*=========================*/ /// <summary> /// /// </summary> internal ServiceInstance(ActiveServiceElement activeConfiguration, ServiceInstance parentInstance, int accountID) { this.Guid = Guid.NewGuid(); ActiveConfigurationProperty.SetValue(this, activeConfiguration); ParentInstanceProperty.SetValue(this, parentInstance); _logSource = activeConfiguration.Name; if (accountID > -1) { AccountIDProperty.SetValue(this, accountID); } _childStateHandler = new EventHandler <ServiceStateChangedEventArgs>(ChildStateChanged); _childOutcomeHandler = new EventHandler(ChildOutcomeReported); _childProgressHandler = new EventHandler(ChildProgressReported); }