Esempio n. 1
0
        protected override void Initialize()
        {
            base.Initialize();
            VSUtils.ForegroundThreadGuard.BindThread();

            IServiceContainer serviceContainer = this;

            serviceContainer.AddService(typeof(GeneralOptionsPage),
                                        delegate { return(GetDialogPage(typeof(GeneralOptionsPage))); }, promote: true);
            serviceContainer.AddService(typeof(FantomasOptionsPage),
                                        delegate { return(GetDialogPage(typeof(FantomasOptionsPage))); }, promote: true);

            var generalOptions = GetService(typeof(GeneralOptionsPage)) as GeneralOptionsPage;

            if (generalOptions.FolderOrganizationEnabled)
            {
                SetupMenu();
                RegisterPriorityCommandTarget();
            }

            library = new FSharpLibrary(Constants.guidSymbolLibrary);
            library.LibraryCapabilities = (_LIB_FLAGS2)_LIB_FLAGS.LF_PROJECT;

            RegisterLibrary();
        }
        protected override void Initialize()
        {
            base.Initialize();
            VSUtils.ForegroundThreadGuard.BindThread();

            IServiceContainer serviceContainer = this;
            serviceContainer.AddService(typeof(IGeneralOptions),
                delegate { return GetDialogPage(typeof(GeneralOptionsPage)); }, promote: true);

            serviceContainer.AddService(typeof(IFormattingOptions),
                delegate { return GetDialogPage(typeof(FantomasOptionsPage)); }, promote: true);

            serviceContainer.AddService(typeof(ICodeGenerationOptions),
                delegate { return GetDialogPage(typeof(CodeGenerationOptionsPage)); }, promote: true);

            serviceContainer.AddService(typeof(IGlobalOptions),
                delegate { return GetDialogPage(typeof(GlobalOptionsPage)); }, promote: true);

            serviceContainer.AddService(typeof(ILintOptions),
                delegate { return GetDialogPage(typeof(Linting.LintOptionsPage)); }, promote: true);

            serviceContainer.AddService(typeof(IOutliningOptions),
                delegate { return GetDialogPage(typeof(OutliningOptionsPage)); }, promote: true);

            var generalOptions = GetService(typeof(IGeneralOptions)) as IGeneralOptions;
            PerformRegistrations(generalOptions);

            library = new FSharpLibrary(Constants.guidSymbolLibrary);
            library.LibraryCapabilities = (_LIB_FLAGS2)_LIB_FLAGS.LF_PROJECT;

            RegisterLibrary();
        }
Esempio n. 3
0
        static void Main(string[] args)
        {
            WriteLine("C# Console App here...");
            WriteLine("Calling libraries...");
            WriteLine();

            WriteLine($"Name: {CSharpLibrary.Name}");
            CSharpLibrary.WriteToConsole();
            CSharpLibrary.WriteThisToConsole("C# Console App here!");
            WriteLine("Who are you? " + CSharpLibrary.WhoAmI());
            WriteLine();

            WriteLine($"Name: {FSharpLibrary.Name}");
            FSharpLibrary.WriteToConsole();
            FSharpLibrary.WriteThisToConsole("C# Console App here!");
            WriteLine("Who are you? " + FSharpLibrary.WhoAmI());
            WriteLine();

            WriteLine($"Name: {VBNetLibrary.Name}");
            VBNetLibrary.WriteToConsole();
            VBNetLibrary.WriteThisToConsole("C# Console App here!");
            WriteLine("Who are you? " + VBNetLibrary.WhoAmI());


            WriteLine("Done!");
            ReadLine();
        }
Esempio n. 4
0
        protected override void Initialize()
        {
            base.Initialize();
            VSUtils.ForegroundThreadGuard.BindThread();

            IServiceContainer serviceContainer = this;

            serviceContainer.AddService(typeof(IGeneralOptions),
                                        delegate { return(GetDialogPage(typeof(GeneralOptionsPage))); }, promote: true);

            serviceContainer.AddService(typeof(IFormattingOptions),
                                        delegate { return(GetDialogPage(typeof(FantomasOptionsPage))); }, promote: true);

            serviceContainer.AddService(typeof(ICodeGenerationOptions),
                                        delegate { return(GetDialogPage(typeof(CodeGenerationOptionsPage))); }, promote: true);

            serviceContainer.AddService(typeof(IGlobalOptions),
                                        delegate { return(GetDialogPage(typeof(GlobalOptionsPage))); }, promote: true);

            var generalOptions = GetService(typeof(IGeneralOptions)) as IGeneralOptions;

            PerformRegistrations(generalOptions);

            library = new FSharpLibrary(Constants.guidSymbolLibrary);
            library.LibraryCapabilities = (_LIB_FLAGS2)_LIB_FLAGS.LF_PROJECT;

            RegisterLibrary();
        }
        protected override void Initialize()
        {
            base.Initialize();
            VSUtils.ForegroundThreadGuard.BindThread();

            IServiceContainer serviceContainer = this;
            serviceContainer.AddService(typeof(GeneralOptionsPage),
                delegate { return GetDialogPage(typeof(GeneralOptionsPage)); }, promote: true);
            serviceContainer.AddService(typeof(FantomasOptionsPage),
                delegate { return GetDialogPage(typeof(FantomasOptionsPage)); }, promote: true);

            var generalOptions = GetService(typeof(GeneralOptionsPage)) as GeneralOptionsPage;
            if (generalOptions.FolderOrganizationEnabled)
            {
                SetupMenu();
                RegisterPriorityCommandTarget();
            }

            library = new FSharpLibrary(Constants.guidSymbolLibrary);
            library.LibraryCapabilities = (_LIB_FLAGS2)_LIB_FLAGS.LF_PROJECT;

            RegisterLibrary();
        }
        protected override void Initialize()
        {
            base.Initialize();
            VSUtils.ForegroundThreadGuard.BindThread();

            var componentModel = (IComponentModel)GetService(typeof(SComponentModel));
            classificationColorManager = componentModel.DefaultExportProvider.GetExportedValue<ClassificationColorManager>();

            AdviseBroadcastMessages();

            IServiceContainer serviceContainer = this;
            serviceContainer.AddService(typeof(GeneralOptionsPage),
                delegate { return GetDialogPage(typeof(GeneralOptionsPage)); }, promote: true);
            serviceContainer.AddService(typeof(FantomasOptionsPage),
                delegate { return GetDialogPage(typeof(FantomasOptionsPage)); }, promote: true);

            var generalOptions = GetService(typeof(GeneralOptionsPage)) as GeneralOptionsPage;
            if (generalOptions.FolderOrganizationEnabled)
            {
                SetupMenu();
                RegisterPriorityCommandTarget();
            }

            library = new FSharpLibrary(Navigation.PkgCmdConst.guidSymbolLibrary);
            library.LibraryCapabilities = (_LIB_FLAGS2)_LIB_FLAGS.LF_PROJECT;

            RegisterLibrary();
        }