Example #1
0
        /// <summary>
        ///
        /// </summary>
        /// <see cref="IAppServerModule.Initialize(IAppServerModuleInitContext)" />
        public void Initialize(IAppServerModuleInitContext initContext)
        {
            lock (this._SYNC)
            {
                if (initContext == null)
                {
                    throw new ArgumentNullException("initContext");
                }

                if (this.IsInitialized)
                {
                    throw new InvalidOperationException();
                }

                var context = initContext.ModuleContext;
                if (context == null)
                {
                    throw new ArgumentException("initContext");
                }

                var isInitialized = true;
                this.OnInitialize(initContext,
                                  ref isInitialized);

                this.Context       = isInitialized ? context : null;
                this.RootDirectory = initContext.RootDirectory;
            }
        }
Example #2
0
 /// <summary>
 ///
 /// </summary>
 /// <see cref="AppServerModuleBase.OnInitialize(IAppServerModuleInitContext, ref bool)" />
 protected override void OnInitialize(IAppServerModuleInitContext initContext,
                                      ref bool isInitialized)
 {
 }
Example #3
0
 /// <summary>
 /// The logic for the <see cref="AppServerModuleBase.Initialize(IAppServerModuleInitContext)" /> method.
 /// </summary>
 /// <param name="initContext">The context.</param>
 /// <param name="isInitialized">
 /// Defines if initilize operation was successful or not.
 /// Is <see langword="true" /> at the beginning.
 /// </param>
 protected abstract void OnInitialize(IAppServerModuleInitContext initContext,
                                      ref bool isInitialized);