/// <summary> /// Initializes a new instance of the <see cref="YafContext"/> class. YafContext Constructor /// </summary> /// <param name="contextLifetimeContainer"> /// The context Lifetime Container. /// </param> internal YafContext(ILifetimeScope contextLifetimeContainer) { this._contextLifetimeContainer = contextLifetimeContainer; // init the respository this._repository = new ContextVariableRepository(this._variables); // init context... this.Init?.Invoke(this, new EventArgs()); }
/// <summary> /// Initializes a new instance of the <see cref="YafContext"/> class. YafContext Constructor /// </summary> /// <param name="contextLifetimeContainer"> /// The context Lifetime Container. /// </param> internal YafContext(ILifetimeScope contextLifetimeContainer) { this._contextLifetimeContainer = contextLifetimeContainer; // init the respository this._repository = new ContextVariableRepository(this._variables); // init context... if (this.Init != null) { this.Init(this, new EventArgs()); } }
/// <summary> /// Initializes a new instance of the <see cref = "YafContext" /> class. /// YafContext Constructor /// </summary> public YafContext() { this._contextLifetimeContainer = GlobalContainer.Container.BeginLifetimeScope(YafLifetimeScope.Context); // init the respository this._repository = new ContextVariableRepository(this._variables); // init context... if (this.Init != null) { this.Init(this, new EventArgs()); } }