Ejemplo n.º 1
0
        // Group: Functions
        // ________________________________________________________________________


        /* Constructor: Instance
         *
         * Creates the instance so you can access modules like <Config>.  The modules will not be started by this
         * function.
         *
         * You can optionally pass your own module objects in which allows you to populate the engine with derived classes.
         * Any left as null will have the default classes created instead.
         */
        public Instance(Config.Manager configManager       = null, CommentTypes.Manager commentTypesManager = null,
                        Languages.Manager languagesManager = null, Comments.Manager commentsManager         = null,
                        Links.Manager linksManager         = null, CodeDB.Manager codeDBManager           = null,
                        Output.Manager outputManager       = null, SearchIndex.Manager searchIndexManager = null,
                        Files.Manager filesManager         = null)
        {
            startupWatchers = new List <IStartupWatcher>();

            this.config       = configManager ?? new Config.Manager(this);
            this.commentTypes = commentTypesManager ?? new CommentTypes.Manager(this);
            this.languages    = languagesManager ?? new Languages.Manager(this);
            this.comments     = commentsManager ?? new Comments.Manager(this);
            this.links        = linksManager ?? new Links.Manager(this);
            this.codeDB       = codeDBManager ?? new CodeDB.Manager(this);
            this.output       = outputManager ?? new Output.Manager(this);
            this.searchIndex  = searchIndexManager ?? new SearchIndex.Manager(this);
            this.files        = filesManager ?? new Files.Manager(this);
        }