Skip to content

Instantly share code, notes, and snippets.

@gashupl
Created April 23, 2019 18:09
Show Gist options
  • Save gashupl/c258c748bee675d6f3306b050f222fbf to your computer and use it in GitHub Desktop.
Save gashupl/c258c748bee675d6f3306b050f222fbf to your computer and use it in GitHub Desktop.
if (this.IsContextValid(pluginExecutionContext))
{
this.Execute(pluginExecutionContext, tracingService);
}
else
{
tracingService.Trace($"Invalid plugin execution context detected (Plugin: {this.Name})");
tracingService.Trace($"Execution context: [{pluginExecutionContext.ToFormattedString()}]");
tracingService.Trace("Plugin execution aborted");
throw new InvalidPluginExecutionException("Invalid plugin execution context detected");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment