private static ConsoleDebugTargetsProvider CreateInstance( ConfiguredProject?configuredProject = null, IDebugTokenReplacer?tokenReplacer = null, IFileSystem?fileSystem = null, IEnvironmentHelper?environment = null, IActiveDebugFrameworkServices?activeDebugFramework = null, ProjectProperties?properties = null, IProjectThreadingService?threadingService = null, IVsDebugger10?debugger = null) { environment ??= Mock.Of <IEnvironmentHelper>(); tokenReplacer ??= IDebugTokenReplacerFactory.Create(); activeDebugFramework ??= IActiveDebugFrameworkServicesFactory.ImplementGetConfiguredProjectForActiveFrameworkAsync(configuredProject); threadingService ??= IProjectThreadingServiceFactory.Create(); debugger ??= IVsDebugger10Factory.ImplementIsIntegratedConsoleEnabled(enabled: false); return(new ConsoleDebugTargetsProvider(configuredProject, tokenReplacer, fileSystem, environment, activeDebugFramework, properties, threadingService, IVsUIServiceFactory.Create <SVsShellDebugger, IVsDebugger10>(debugger))); }
private static VsContainedLanguageComponentsFactory CreateInstance( IVsProject4 project, IVsContainedLanguageFactory?containedLanguageFactory = null, IVsHierarchy?hierarchy = null, ProjectProperties?properties = null, IActiveWorkspaceProjectContextHost?projectContextHost = null) { var serviceProvider = IOleAsyncServiceProviderFactory.ImplementQueryServiceAsync(containedLanguageFactory, new Guid(LanguageServiceId)); var projectVsServices = new IUnconfiguredProjectVsServicesMock(); projectVsServices.ImplementVsHierarchy(hierarchy); projectVsServices.ImplementVsProject(project); projectVsServices.ImplementThreadingService(IProjectThreadingServiceFactory.Create()); projectVsServices.ImplementActiveConfiguredProjectProperties(properties); return(CreateInstance(serviceProvider, projectVsServices.Object, projectContextHost)); }
private static ProjectLaunchTargetsProvider CreateInstance( ConfiguredProject?configuredProject = null, IDebugTokenReplacer?tokenReplacer = null, IFileSystem?fileSystem = null, IEnvironmentHelper?environment = null, IActiveDebugFrameworkServices?activeDebugFramework = null, ProjectProperties?properties = null, IProjectThreadingService?threadingService = null, IVsDebugger10?debugger = null) { environment ??= Mock.Of <IEnvironmentHelper>(); tokenReplacer ??= IDebugTokenReplacerFactory.Create(); activeDebugFramework ??= IActiveDebugFrameworkServicesFactory.ImplementGetConfiguredProjectForActiveFrameworkAsync(configuredProject); threadingService ??= IProjectThreadingServiceFactory.Create(); debugger ??= IVsDebugger10Factory.ImplementIsIntegratedConsoleEnabled(enabled: false); IUnconfiguredProjectVsServices unconfiguredProjectVsServices = IUnconfiguredProjectVsServicesFactory.Implement(() => IVsHierarchyFactory.Create()); IRemoteDebuggerAuthenticationService remoteDebuggerAuthenticationService = Mock.Of <IRemoteDebuggerAuthenticationService>(); return(new ProjectLaunchTargetsProvider(unconfiguredProjectVsServices, configuredProject !, tokenReplacer, fileSystem !, environment, activeDebugFramework, properties !, threadingService, IVsUIServiceFactory.Create <SVsShellDebugger, IVsDebugger10>(debugger), remoteDebuggerAuthenticationService)); }
public IUnconfiguredProjectVsServicesMock ImplementActiveConfiguredProjectProperties(ProjectProperties?projectProperties) { SetupGet <ProjectProperties?>(m => m.ActiveConfiguredProjectProperties) .Returns(projectProperties); return(this); }
public static IUnconfiguredProjectCommonServices Create(UnconfiguredProject?project = null, IProjectThreadingService?threadingService = null, ConfiguredProject?configuredProject = null, ProjectProperties?projectProperties = null, IProjectAccessor?projectAccessor = null) { var mock = new Mock <IUnconfiguredProjectCommonServices>(); if (project != null) { mock.Setup(s => s.Project) .Returns(project); } if (threadingService != null) { mock.Setup(s => s.ThreadingService) .Returns(threadingService); } if (configuredProject != null) { mock.Setup(s => s.ActiveConfiguredProject) .Returns(configuredProject); } if (projectProperties != null) { mock.Setup(s => s.ActiveConfiguredProjectProperties) .Returns(projectProperties); } if (projectAccessor != null) { mock.Setup(s => s.ProjectAccessor) .Returns(projectAccessor); } return(mock.Object); }
private static AppDesignerFolderSpecialFileProvider CreateInstance(IPhysicalProjectTree?physicalProjectTree = null, ProjectProperties?properties = null) { physicalProjectTree ??= IPhysicalProjectTreeFactory.Create(); properties ??= CreateProperties(appDesignerFolderName: "Properties"); return(new AppDesignerFolderSpecialFileProvider(physicalProjectTree, properties)); }
private static AppDesignerFolderSpecialFileProvider CreateInstance(IPhysicalProjectTree?physicalProjectTree = null, ProjectProperties?properties = null) { physicalProjectTree ??= IPhysicalProjectTreeFactory.Create(); properties ??= ProjectPropertiesFactory.CreateEmpty(); return(new AppDesignerFolderSpecialFileProvider(new Lazy <IPhysicalProjectTree>(() => physicalProjectTree), properties)); }