Пример #1
0
        //<doc:execute>
        /// <summary>
        /// Run the application.
        /// </summary>
        public override BoolMessageItem Execute()
        {
            // 1. ExtensionService loads classes with "Extension" attribute w/ interface IBlogWidget
            var exts = new ExtensionService <ExtensionAttribute, IBlogWidget>();

            // 2. Load extensions/plugins from "CommonLibrary"
            exts.Load("CommonLibrary");

            // 3. Get instance of extension with name "BlogWidget_1".
            IBlogWidget widget  = exts.Create("BlogWidget_1");
            var         content = widget.Render();

            return(BoolMessageItem.True);
        }