本文整理汇总了C#中VisualStudioWorkspaceImpl类的典型用法代码示例。如果您正苦于以下问题:C# VisualStudioWorkspaceImpl类的具体用法?C# VisualStudioWorkspaceImpl怎么用?C# VisualStudioWorkspaceImpl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
VisualStudioWorkspaceImpl类属于命名空间,在下文中一共展示了VisualStudioWorkspaceImpl类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: VisualStudioWorkspaceDiagnosticAnalyzerProviderService
public VisualStudioWorkspaceDiagnosticAnalyzerProviderService(VisualStudioWorkspaceImpl workspace)
{
// Get the analyzer assets for installed VSIX extensions through the VSIX extension manager.
var extensionManager = workspace.GetVsService<SVsExtensionManager, IVsExtensionManager>();
_hostDiagnosticAnalyzerInfo = GetHostAnalyzerPackagesWithName(extensionManager);
}
示例2: CSharpProjectShim
public CSharpProjectShim(
ICSharpProjectRoot projectRoot,
VisualStudioProjectTracker projectTracker,
Func<ProjectId, IVsReportExternalErrors> reportExternalErrorCreatorOpt,
string projectSystemName,
IVsHierarchy hierarchy,
IServiceProvider serviceProvider,
VisualStudioWorkspaceImpl visualStudioWorkspaceOpt,
HostDiagnosticUpdateSource hostDiagnosticUpdateSourceOpt,
ICommandLineParserService commandLineParserServiceOpt)
: base(projectTracker,
reportExternalErrorCreatorOpt,
projectSystemName,
hierarchy,
LanguageNames.CSharp,
serviceProvider,
visualStudioWorkspaceOpt,
hostDiagnosticUpdateSourceOpt,
commandLineParserServiceOpt)
{
_projectRoot = projectRoot;
_warningNumberArrayPointer = Marshal.AllocHGlobal(0);
// Ensure the default options are set up
ResetAllOptions();
UpdateOptions();
projectTracker.AddProject(this);
}
示例3: CSharpProjectShim
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);
}
示例4: AddAdditionalDocumentUndoUnit
public AddAdditionalDocumentUndoUnit(
VisualStudioWorkspaceImpl workspace,
DocumentInfo docInfo,
SourceText text)
: base(workspace, docInfo, text)
{
}
示例5: AbstractRemoveDocumentUndoUnit
protected AbstractRemoveDocumentUndoUnit(
VisualStudioWorkspaceImpl workspace,
DocumentId documentId)
: base(workspace, documentId.ProjectId)
{
DocumentId = documentId;
}
示例6: PackageInstallerService
public PackageInstallerService(
VisualStudioWorkspaceImpl workspace,
IVsEditorAdaptersFactoryService editorAdaptersFactoryService)
{
_workspace = workspace;
_editorAdaptersFactoryService = editorAdaptersFactoryService;
}
示例7: AbstractLegacyProject
public AbstractLegacyProject(
VisualStudioProjectTracker projectTracker,
Func<ProjectId, IVsReportExternalErrors> reportExternalErrorCreatorOpt,
string projectSystemName,
IVsHierarchy hierarchy,
string language,
IServiceProvider serviceProvider,
VisualStudioWorkspaceImpl visualStudioWorkspaceOpt,
HostDiagnosticUpdateSource hostDiagnosticUpdateSourceOpt)
: base(projectTracker,
reportExternalErrorCreatorOpt,
projectSystemName,
projectFilePath: GetProjectFilePath(hierarchy),
projectGuid: GetProjectIDGuid(hierarchy),
projectTypeGuid: GetProjectType(hierarchy),
hierarchy: hierarchy,
language: language,
serviceProvider: serviceProvider,
visualStudioWorkspaceOpt: visualStudioWorkspaceOpt,
hostDiagnosticUpdateSourceOpt: hostDiagnosticUpdateSourceOpt)
{
ConnectHierarchyEvents();
this.IsWebSite = GetIsWebsiteProject(hierarchy);
_lastParsedCompilerOptions = string.Empty;
var commandLineArguments = ParseCommandLineArguments(SpecializedCollections.EmptyEnumerable<string>());
base.SetArguments(commandLineArguments);
}
示例8: AbstractLegacyProject
public AbstractLegacyProject(
VisualStudioProjectTracker projectTracker,
Func<ProjectId, IVsReportExternalErrors> reportExternalErrorCreatorOpt,
string projectSystemName,
IVsHierarchy hierarchy,
string language,
IServiceProvider serviceProvider,
VisualStudioWorkspaceImpl visualStudioWorkspaceOpt,
HostDiagnosticUpdateSource hostDiagnosticUpdateSourceOpt,
ICommandLineParserService commandLineParserServiceOpt = null)
: base(projectTracker,
reportExternalErrorCreatorOpt,
projectSystemName,
projectFilePath: GetProjectFilePath(hierarchy),
hierarchy: hierarchy,
projectGuid: GetProjectIDGuid(hierarchy),
language: language,
serviceProvider: serviceProvider,
visualStudioWorkspaceOpt: visualStudioWorkspaceOpt,
hostDiagnosticUpdateSourceOpt: hostDiagnosticUpdateSourceOpt,
commandLineParserServiceOpt: commandLineParserServiceOpt)
{
if (Hierarchy != null)
{
ConnectHierarchyEvents();
this.IsWebSite = GetIsWebsiteProject(Hierarchy);
}
// Initialize command line arguments.
base.SetArguments(commandLine: string.Empty);
}
示例9: VisualStudioErrorReportingServiceFactory
public VisualStudioErrorReportingServiceFactory(
VisualStudioWorkspaceImpl workspace,
IForegroundNotificationService foregroundNotificationService,
[ImportMany] IEnumerable<Lazy<IAsynchronousOperationListener, FeatureMetadata>> asyncListeners)
{
_singleton = new VisualStudioErrorReportingService(workspace, foregroundNotificationService, new AggregateAsynchronousOperationListener(asyncListeners, FeatureAttribute.InfoBar));
}
示例10: VisualStudioErrorReportingService
public VisualStudioErrorReportingService(
VisualStudioWorkspaceImpl workspace, IForegroundNotificationService foregroundNotificationService, IAsynchronousOperationListener listener)
{
_workspace = workspace;
_foregroundNotificationService = foregroundNotificationService;
_listener = listener;
}
示例11: NavigationBarClient
public NavigationBarClient(
IVsDropdownBarManager manager,
IVsCodeWindow codeWindow,
IServiceProvider serviceProvider,
VisualStudioWorkspaceImpl workspace)
{
_manager = manager;
_codeWindow = codeWindow;
_workspace = workspace;
_imageService = (IVsImageService2)serviceProvider.GetService(typeof(SVsImageService));
_projectItems = SpecializedCollections.EmptyList<NavigationBarProjectItem>();
_currentTypeItems = SpecializedCollections.EmptyList<NavigationBarItem>();
var vsShell = serviceProvider.GetService(typeof(SVsShell)) as IVsShell;
if (vsShell != null)
{
object varImageList;
int hresult = vsShell.GetProperty((int)__VSSPROPID.VSSPROPID_ObjectMgrTypesImgList, out varImageList);
if (ErrorHandler.Succeeded(hresult) && varImageList != null)
{
_imageList = (IntPtr)(int)varImageList;
}
}
_codeWindowEventsSink = ComEventSink.Advise<IVsCodeWindowEvents>(codeWindow, this);
_editorAdaptersFactoryService = serviceProvider.GetMefService<IVsEditorAdaptersFactoryService>();
IVsTextView pTextView;
codeWindow.GetPrimaryView(out pTextView);
StartTrackingView(pTextView);
pTextView = null;
codeWindow.GetSecondaryView(out pTextView);
StartTrackingView(pTextView);
}
示例12: AbstractAddRemoveUndoUnit
protected AbstractAddRemoveUndoUnit(
VisualStudioWorkspaceImpl workspace,
ProjectId fromProjectId)
{
Workspace = workspace;
FromProjectId = fromProjectId;
}
示例13: AnalyzerDependencyCheckingService
public AnalyzerDependencyCheckingService(
VisualStudioWorkspaceImpl workspace,
HostDiagnosticUpdateSource updateSource)
{
_workspace = workspace;
_updateSource = updateSource;
}
示例14: CPSProject
public CPSProject(
VisualStudioProjectTracker projectTracker,
Func<ProjectId, IVsReportExternalErrors> reportExternalErrorCreatorOpt,
string projectDisplayName,
string projectFilePath,
IVsHierarchy hierarchy,
string language,
Guid projectGuid,
string commandLineForOptions,
IServiceProvider serviceProvider,
VisualStudioWorkspaceImpl visualStudioWorkspaceOpt,
HostDiagnosticUpdateSource hostDiagnosticUpdateSourceOpt,
ICommandLineParserService commandLineParserServiceOpt)
: base(projectTracker, reportExternalErrorCreatorOpt, projectDisplayName, projectFilePath,
hierarchy, language, projectGuid, serviceProvider, visualStudioWorkspaceOpt, hostDiagnosticUpdateSourceOpt, commandLineParserServiceOpt)
{
// Initialize the options.
SetCommandLineArguments(commandLineForOptions);
// We need to ensure that the bin output path for the project has been initialized before we hookup the project with the project tracker.
// If we were unable to set the output path from SetCommandLineArguments (due to null output file name or directory in the given commandLineForOptions),
// we set a default unique output path.
if (this.TryGetBinOutputPath() == null)
{
var uniqueDefaultOutputPath = PathUtilities.CombinePathsUnchecked(Path.GetTempPath(), projectDisplayName + projectGuid.GetHashCode().ToString());
SetOutputPathAndRelatedData(objOutputPath: uniqueDefaultOutputPath, hasSameBinAndObjOutputPaths: true);
}
Contract.ThrowIfNull(this.TryGetBinOutputPath());
// Now hook up the project to the project tracker.
projectTracker.AddProject(this);
_lastDesignTimeBuildSucceeded = true;
}
示例15: AnalyzerDependencyCheckingService
public AnalyzerDependencyCheckingService(
VisualStudioWorkspaceImpl workspace,
HostDiagnosticUpdateSource updateSource)
{
_workspace = workspace;
_updateSource = updateSource;
_bindingRedirectionService = new BindingRedirectionService();
}