PopIndent() публичный Метод

Decreases the current log entry indent.
public PopIndent ( ) : void
Результат void
Пример #1
0
        /// <summary>
        /// Initializes all previously loaded plugins.
        /// </summary>
        public override void InitPlugins()
        {
            Log.Write(LogType.Info, "Initializing core plugins...");
            Log.PushIndent();

            CorePlugin[] initPlugins = this.LoadedPlugins.ToArray();
            foreach (CorePlugin plugin in initPlugins)
            {
                this.InitPlugin(plugin);
            }

            Log.PopIndent();
        }
Пример #2
0
        /// <summary>
        /// Loads all available core plugins, as well as auxilliary libraries.
        /// </summary>
        public override void LoadPlugins()
        {
            List <string> auxilLibs = new List <string>();

            foreach (string dllPath in this.AssemblyLoader.AvailableAssemblyPaths)
            {
                if (!dllPath.EndsWith(".core.dll", StringComparison.OrdinalIgnoreCase))
                {
                    //if (!dllPath.EndsWith(".editor.dll", StringComparison.OrdinalIgnoreCase)) {
                    //    auxilLibs.Add(dllPath);
                    //}

                    continue;
                }

                this.LoadPlugin(dllPath);
            }

            // Make sure to have all plugin-related Assemblies available even before even
            // getting an AssemblyResolve event - we might need to resolve their Types due
            // to deserialization, which may happen before touching any related class in code.
            if (auxilLibs.Count > 0)
            {
                Log.Write(LogType.Verbose, "Loading auxiliary libraries...");
                Log.PushIndent();

                foreach (string dllPath in auxilLibs)
                {
                    // Load the Assembly in try-only mode, as we might accidentally stumble upon
                    // unmanaged or incompatible Assemblies in the process.
                    this.LoadAuxilliaryLibrary(dllPath, true);
                }

                Log.PopIndent();
            }
        }