public static void ActivateGuidanceInstance(this IGuidanceManager guidanceManager, IServiceProvider provider, IGuidanceExtension instance) { Guard.NotNull(() => guidanceManager, guidanceManager); Guard.NotNull(() => provider, provider); Guard.NotNull(() => instance, instance); if (provider != null) { guidanceManager.ShowGuidanceWindows(provider); } tracer.Info(Resources.GuidanceManagerExtensions_TraceActivation, instance.InstanceName); // Activate guidance extension in Guidance Explorer guidanceManager.ActiveGuidanceExtension = instance; }
public static IGuidanceExtension InstantiateGuidanceInstance(this IGuidanceManager guidanceManager, IServiceProvider provider, string extensionId, string instanceName) { Guard.NotNull(() => guidanceManager, guidanceManager); Guard.NotNull(() => provider, provider); Guard.NotNullOrEmpty(() => extensionId, extensionId); if (provider != null) { guidanceManager.ShowGuidanceWindows(provider); } tracer.Info(Resources.GuidanceManagerExtensions_TraceInstantiation, extensionId, instanceName); // Create a new instance of guidance workflow var instance = guidanceManager.Instantiate(extensionId, instanceName); // Activate guidance extension in Guidance Explorer guidanceManager.ActiveGuidanceExtension = instance; return(instance); }