예제 #1
0
 // ReSharper disable once NotNullMemberIsNotInitialized
 // Plugin instance is created at the Discovery phase and Configuration is loaded afterwards
 private Plugin(
     [NotNull] IManifestHelper manifest,
     [NotNull] ILoggingHelper logging,
     [NotNull] PluginReference reference
     )
 {
     Manifest  = manifest;
     Logging   = logging;
     Reference = reference;
 }
 // ReSharper disable once NotNullMemberIsNotInitialized
 // Plugin instance is created at the Discovery phase and Configuration is loaded afterwards
 private Plugin(
     IManifestHelper manifest,
     ILoggingHelper logging,
     PluginReference reference
     )
 {
     Manifest  = manifest;
     Logging   = logging;
     Reference = reference;
 }
예제 #3
0
 /// <summary>
 /// Create a <see cref="Plugin"/> instance for the given context, manifest and reference.
 /// </summary>
 /// <param name="applicationContext">the <see cref="IApplicationContext"/> the plugin is running in</param>
 /// <param name="manifest">the <see cref="IManifestHelper"/> that describes this plugin</param>
 /// <param name="reference">the <see cref="PluginReference"/> with pre-searched reflection information</param>
 /// <returns></returns>
 internal static Plugin Create(
     [NotNull] IApplicationContext applicationContext,
     [NotNull] IManifestHelper manifest,
     [NotNull] PluginReference reference
     ) => new Plugin(manifest, new LoggingHelper(applicationContext.Logger, manifest), reference);