public CSharpProjectShim(
            ICSharpProjectRoot projectRoot,
            VisualStudioProjectTracker projectTracker,
            Func<ProjectId, IVsReportExternalErrors> reportExternalErrorCreatorOpt,
            string projectSystemName,
            IVsHierarchy hierarchy,
            IServiceProvider serviceProvider,
            MiscellaneousFilesWorkspace miscellaneousFilesWorkspaceOpt,
            VisualStudioWorkspaceImpl visualStudioWorkspaceOpt,
            HostDiagnosticUpdateSource hostDiagnosticUpdateSourceOpt)
            : base(projectTracker,
                   reportExternalErrorCreatorOpt,
                   projectSystemName,
                   hierarchy,
                   LanguageNames.CSharp,
                   serviceProvider,
                   miscellaneousFilesWorkspaceOpt,
                   visualStudioWorkspaceOpt,
                   hostDiagnosticUpdateSourceOpt)
        {
            _projectRoot = projectRoot;
            _warningNumberArrayPointer = Marshal.AllocHGlobal(0);

            InitializeOptions();

            projectTracker.AddProject(this);
        }
 public AbstractRoslynProject(
     VisualStudioProjectTracker projectTracker,
     Func<ProjectId, IVsReportExternalErrors> reportExternalErrorCreatorOpt,
     string projectSystemName,
     IVsHierarchy hierarchy,
     string language,
     IServiceProvider serviceProvider,
     MiscellaneousFilesWorkspace miscellaneousFilesWorkspaceOpt,
     VisualStudioWorkspaceImpl visualStudioWorkspaceOpt,
     HostDiagnosticUpdateSource hostDiagnosticUpdateSourceOpt)
     : base(projectTracker, reportExternalErrorCreatorOpt, projectSystemName, hierarchy, language, serviceProvider, miscellaneousFilesWorkspaceOpt, visualStudioWorkspaceOpt, hostDiagnosticUpdateSourceOpt)
 {
     if (visualStudioWorkspaceOpt != null)
     {
         this.EditAndContinueImplOpt = new VsENCRebuildableProjectImpl(this);
     }
 }
 public CSharpProjectShimWithServices(
     ICSharpProjectRoot projectRoot,
     VisualStudioProjectTracker projectTracker,
     Func<ProjectId, IVsReportExternalErrors> reportExternalErrorCreatorOpt,
     string projectSystemName,
     IVsHierarchy hierarchy,
     IServiceProvider serviceProvider,
     MiscellaneousFilesWorkspace miscellaneousFilesWorkspaceOpt,
     VisualStudioWorkspaceImpl visualStudioWorkspaceOpt,
     HostDiagnosticUpdateSource hostDiagnosticUpdateSourceOpt)
     : base(
           projectRoot,
           projectTracker,
           reportExternalErrorCreatorOpt,
           projectSystemName,
           hierarchy,
           serviceProvider,
           miscellaneousFilesWorkspaceOpt,
           visualStudioWorkspaceOpt,
           hostDiagnosticUpdateSourceOpt)
 {
 }
        protected CSharpProject(
            VisualStudioProjectTracker projectTracker,
            Func<ProjectId, IVsReportExternalErrors> reportExternalErrorCreatorOpt,
            string projectSystemName,
            IVsHierarchy hierarchy,
            IServiceProvider serviceProvider,
            MiscellaneousFilesWorkspace miscellaneousFilesWorkspaceOpt,
            VisualStudioWorkspaceImpl visualStudioWorkspaceOpt,
            HostDiagnosticUpdateSource hostDiagnosticUpdateSourceOpt)
            : base(projectTracker,
                   reportExternalErrorCreatorOpt,
                   projectSystemName,
                   hierarchy,
                   LanguageNames.CSharp,
                   serviceProvider,
                   miscellaneousFilesWorkspaceOpt,
                   visualStudioWorkspaceOpt,
                   hostDiagnosticUpdateSourceOpt)
        {
            InitializeOptions();

            projectTracker.AddProject(this);
        }
Exemple #5
0
        public AbstractProject(
            VisualStudioProjectTracker projectTracker,
            Func<ProjectId, IVsReportExternalErrors> reportExternalErrorCreatorOpt,
            string projectSystemName,
            IVsHierarchy hierarchy,
            string language,
            IServiceProvider serviceProvider,
            MiscellaneousFilesWorkspace miscellaneousFilesWorkspaceOpt,
            VisualStudioWorkspaceImpl visualStudioWorkspaceOpt,
            HostDiagnosticUpdateSource hostDiagnosticUpdateSourceOpt)
        {
            Contract.ThrowIfNull(projectSystemName);

            _language = language;
            this.ServiceProvider = serviceProvider;
            _hierarchy = hierarchy;

            var componentModel = (IComponentModel)serviceProvider.GetService(typeof(SComponentModel));

            _contentTypeRegistryService = componentModel.GetService<IContentTypeRegistryService>();
            this.RunningDocumentTable = (IVsRunningDocumentTable4)serviceProvider.GetService(typeof(SVsRunningDocumentTable));

            this.DisplayName = _projectSystemName;
            _projectSystemName = projectSystemName;
            this.ProjectTracker = projectTracker;
            _miscellaneousFilesWorkspaceOpt = miscellaneousFilesWorkspaceOpt;
            _visualStudioWorkspaceOpt = visualStudioWorkspaceOpt;
            _hostDiagnosticUpdateSourceOpt = hostDiagnosticUpdateSourceOpt;

            UpdateProjectDisplayNameAndFilePath();

            if (_filePathOpt != null)
            {
                _version = VersionStamp.Create(File.GetLastWriteTimeUtc(_filePathOpt));
            }
            else
            {
                _version = VersionStamp.Create();
            }

            _id = this.ProjectTracker.GetOrCreateProjectIdForPath(_filePathOpt ?? _projectSystemName, _projectSystemName);
            if (reportExternalErrorCreatorOpt != null)
            {
                _externalErrorReporter = reportExternalErrorCreatorOpt(_id);
            }

            if (visualStudioWorkspaceOpt != null)
            {
                this.EditAndContinueImplOpt = new VsENCRebuildableProjectImpl(this);
            }

            ConnectHierarchyEvents();

            SetIsWebstite(hierarchy);
        }
 public MiscellaneousDiagnosticListTable(
     SVsServiceProvider serviceProvider, MiscellaneousFilesWorkspace workspace, IDiagnosticService diagnosticService, ITableManagerProvider provider) :
     base(serviceProvider, workspace, diagnosticService, Identifier, provider)
 {
     AddTableSource();
 }
 public MiscellaneousTodoListTable(MiscellaneousFilesWorkspace workspace, ITodoListProvider todoListProvider, ITableManagerProvider provider) :
     base(workspace, todoListProvider, Identifier, provider)
 {
     AddTableSource();
 }
 public MiscellaneousTodoListTable(MiscellaneousFilesWorkspace workspace, ITodoListProvider todoListProvider, ITableManagerProvider provider) :
     base(workspace, todoListProvider, IdentifierString, provider)
 {
     ConnectWorkspaceEvents();
 }
 public MiscellaneousDiagnosticListTable(
     SVsServiceProvider serviceProvider, MiscellaneousFilesWorkspace workspace, IDiagnosticService diagnosticService, ITableManagerProvider provider) :
     this(serviceProvider, (Workspace)workspace, diagnosticService, provider)
 {
     ConnectWorkspaceEvents();
 }