コード例 #1
0
ファイル: Workspace.cs プロジェクト: RoryVL/roslyn
        internal Workspace(VisualStudioInstance visualStudioInstance)
        {
            _visualStudioInstance = visualStudioInstance;

            var integrationService = _visualStudioInstance.IntegrationService;
            _workspaceWrapper = integrationService.Execute<WorkspaceWrapper>(typeof(WorkspaceWrapper), nameof(WorkspaceWrapper.Create));
        }
コード例 #2
0
ファイル: EditorWindow.cs プロジェクト: RoryVL/roslyn
        internal EditorWindow(VisualStudioInstance visualStudioInstance)
        {
            _visualStudioInstance = visualStudioInstance;

            var integrationService = _visualStudioInstance.IntegrationService;
            _editorWindowWrapper = integrationService.Execute<EditorWindowWrapper>(typeof(EditorWindowWrapper), nameof(EditorWindowWrapper.Create), (BindingFlags.Public | BindingFlags.Static));
        }
コード例 #3
0
ファイル: EditorWindow.cs プロジェクト: zlphoenix/roslyn
        internal EditorWindow(VisualStudioInstance visualStudioInstance)
        {
            _visualStudioInstance = visualStudioInstance;

            var integrationService = _visualStudioInstance.IntegrationService;

            _editorWindowWrapper = integrationService.Execute <EditorWindowWrapper>(typeof(EditorWindowWrapper), nameof(EditorWindowWrapper.Create), (BindingFlags.Public | BindingFlags.Static));
        }
コード例 #4
0
ファイル: Workspace.cs プロジェクト: zlphoenix/roslyn
        internal Workspace(VisualStudioInstance visualStudioInstance)
        {
            _visualStudioInstance = visualStudioInstance;

            var integrationService = _visualStudioInstance.IntegrationService;

            _workspaceWrapper = integrationService.Execute <WorkspaceWrapper>(typeof(WorkspaceWrapper), nameof(WorkspaceWrapper.Create));
        }
コード例 #5
0
ファイル: InteractiveWindow.cs プロジェクト: RoryVL/roslyn
        internal InteractiveWindow(VisualStudioInstance visualStudioInstance, string dteViewCommand, string dteWindowTitle, string createMethodName)
        {
            _visualStudioInstance = visualStudioInstance;
            _dteViewCommand = dteViewCommand;

            // We have to show the window at least once to ensure the interactive service is loaded.
            ShowAsync(waitForPrompt: false).GetAwaiter().GetResult();

            var dteWindow = IntegrationHelper.WaitForNotNullAsync(() => _visualStudioInstance.Dte.LocateWindow(dteWindowTitle)).GetAwaiter().GetResult();
            IntegrationHelper.RetryRpcCall(() => dteWindow.Close());

            // Return a wrapper to the actual interactive window service that exists in the host process
            var integrationService = _visualStudioInstance.IntegrationService;
            _interactiveWindowWrapper = integrationService.Execute<InteractiveWindowWrapper>(typeof(InteractiveWindowWrapper), createMethodName);
        }
コード例 #6
0
        internal InteractiveWindow(VisualStudioInstance host, string dteViewCommand, string dteWindowTitle)
        {
            _host           = host;
            _dteViewCommand = dteViewCommand;

            // We have to show the window at least once to ensure the interactive service is loaded.
            ShowAsync(waitForPrompt: false).GetAwaiter().GetResult();

            var dteWindow = _host.LocateDteWindowAsync(dteWindowTitle).GetAwaiter().GetResult();

            dteWindow.Close();

            // Return a wrapper to the actual interactive window service that exists in the host process
            _interactiveWindowWrapper = _host.ExecuteOnHostProcess <InteractiveWindowWrapper>(typeof(RemotingHelper), nameof(RemotingHelper.CreateCSharpInteractiveWindowWrapper), (BindingFlags.Public | BindingFlags.Static));
        }
コード例 #7
0
        internal InteractiveWindow(VisualStudioInstance visualStudioInstance, string dteViewCommand, string dteWindowTitle, string createMethodName)
        {
            _visualStudioInstance = visualStudioInstance;
            _dteViewCommand       = dteViewCommand;

            // We have to show the window at least once to ensure the interactive service is loaded.
            ShowAsync(waitForPrompt: false).GetAwaiter().GetResult();

            var dteWindow = IntegrationHelper.WaitForNotNullAsync(() => _visualStudioInstance.Dte.LocateWindow(dteWindowTitle)).GetAwaiter().GetResult();

            IntegrationHelper.RetryRpcCall(() => dteWindow.Close());

            // Return a wrapper to the actual interactive window service that exists in the host process
            var integrationService = _visualStudioInstance.IntegrationService;

            _interactiveWindowWrapper = integrationService.Execute <InteractiveWindowWrapper>(typeof(InteractiveWindowWrapper), createMethodName);
        }
コード例 #8
0
 public CSharpInteractiveWindow(VisualStudioInstance visualStudioInstance) : base(visualStudioInstance, DteViewCommand, DteWindowTitle, CreateMethodName)
 {
 }
コード例 #9
0
        // TODO: Integrate with the SolutionExplorer service

        internal SolutionExplorer(VisualStudioInstance visualStudio)
        {
            _visualStudio = visualStudio;
        }
コード例 #10
0
 internal VisualStudioInstanceContext(VisualStudioInstance instance, VisualStudioInstanceFactory instanceFactory)
 {
     this.Instance    = instance;
     _instanceFactory = instanceFactory;
 }
コード例 #11
0
ファイル: SolutionExplorer.cs プロジェクト: zlphoenix/roslyn
        // TODO: Integrate with the SolutionExplorer service

        internal SolutionExplorer(VisualStudioInstance visualStudio)
        {
            _visualStudio = visualStudio;
        }
コード例 #12
0
 internal VisualStudioInstanceContext(VisualStudioInstance instance, VisualStudioInstanceFactory instanceFactory)
 {
     this.Instance = instance;
     _instanceFactory = instanceFactory;
 }
コード例 #13
0
ファイル: EditorWindow.cs プロジェクト: AlexanderSher/roslyn
 internal EditorWindow(VisualStudioInstance visualStudio)
 {
     _visualStudio = visualStudio;
 }
コード例 #14
0
 /// <summary>Creates a <see cref="InteractiveWindow"/> instance that can interact with the C# interactive window in the Visual Studio host.</summary>
 internal static InteractiveWindow CreateCSharpInteractiveWindow(VisualStudioInstance host)
 => new InteractiveWindow(host, DteCSharpViewCommand, DteCSharpWindowTitle);
コード例 #15
0
 public CSharpInteractiveWindow(VisualStudioInstance visualStudioInstance) : base(visualStudioInstance, DteViewCommand, DteWindowTitle, CreateMethodName)
 {
 }