Skip to content

Instantly share code, notes, and snippets.

@hishaamn
Created July 14, 2024 09:13
Show Gist options
  • Save hishaamn/29b905a24d4dfcb28d154a44cef211e7 to your computer and use it in GitHub Desktop.
Save hishaamn/29b905a24d4dfcb28d154a44cef211e7 to your computer and use it in GitHub Desktop.
IProcessingContext installationContext = InstallerManager.CreateInstallationContext(this._skipFile);
public static IProcessingContext CreateInstallationContext(bool skipFile = false) => (IProcessingContext)new ExtSimpleProcessingContext(skipFile);
public void InstallPackage(string path, bool registerInstallation, ISource<PackageEntry> source, IProcessingContext context)
{
//..omit for brevity
using (new PackageInstallationContext())
{
using (ConfigWatcher.PostponeEvents())
{
ISink<PackageEntry> installerSink = CreateInstallerSink(context);
if(context is ExtSimpleProcessingContext extSimpleProcessingContext)
{
new CustomEntrySorter(source, extSimpleProcessingContext.SkipFile).Populate(installerSink);
}
else
{
new CustomEntrySorter(source).Populate(installerSink);
}
//..omit for brevity
}
}
//..omit for brevity
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment