static CompositionContainer CreateOutOfProcCompositionContainer() { var compositionContainer = CreateCompositionContainer(CreateOutOfProcExports()); var packageSettings = new OutOfProcPackageSettings(); var usageTracker = UsageTrackerFactory.CreateUsageTracker(compositionContainer, packageSettings); compositionContainer.ComposeExportedValue(usageTracker); return(compositionContainer); }
static CompositionContainer CreateVisualStudioCompositionContainer(ExportProvider defaultExportProvider) { var compositionContainer = CreateCompositionContainer(defaultExportProvider); var gitHubServiceProvider = compositionContainer.GetExportedValue <IGitHubServiceProvider>(); var packageSettings = new PackageSettings(gitHubServiceProvider); var usageTracker = UsageTrackerFactory.CreateUsageTracker(compositionContainer, packageSettings); compositionContainer.ComposeExportedValue(usageTracker); return(compositionContainer); }