Created
April 23, 2019 18:07
-
-
Save gashupl/c4ce7404ef9d99286cae9dc40127c170 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public void Execute(IServiceProvider serviceProvider) | |
| { | |
| if (serviceProvider == null) | |
| { | |
| throw new ArgumentNullException(nameof(serviceProvider)); | |
| } | |
| ITracingService tracingService = (ITracingService)serviceProvider.GetService(typeof(ITracingService)); | |
| if (tracingService == null) | |
| { | |
| throw new ApplicationException("Failed to initialize plugin tracing service"); | |
| } | |
| IPluginExecutionContext pluginExecutionContext = (IPluginExecutionContext)serviceProvider.GetService(typeof(IPluginExecutionContext)); | |
| if (pluginExecutionContext == null) | |
| { | |
| throw new ApplicationException("Failed to initialize plugin execution context"); | |
| } | |
| //… | |
| } | |
| #region Abstract methods | |
| public abstract bool IsContextValid(IPluginExecutionContext context); | |
| public abstract void Execute(IPluginExecutionContext pluginExecutionContext, ITracingService tracingService); | |
| #endregion |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment