/// <summary> /// Initializes a new instance of the <see cref="SkillDialog"/> class. /// SkillDialog constructor that accepts the manifest description of a Skill along with TelemetryClient for end to end telemetry. /// </summary> /// <param name="skillManifest">Skill manifest.</param> /// <param name="serviceClientCredentials">Service client credentials.</param> /// <param name="telemetryClient">Telemetry Client.</param> /// <param name="userState">User State.</param> /// <param name="authDialog">Auth Dialog.</param> /// <param name="skillIntentRecognizer">Skill Intent Recognizer.</param> /// <param name="skillTransport">Transport used for skill invocation.</param> public SkillDialog( SkillManifest skillManifest, IServiceClientCredentials serviceClientCredentials, IBotTelemetryClient telemetryClient, UserState userState, MultiProviderAuthDialog authDialog = null, ISkillIntentRecognizer skillIntentRecognizer = null, ISkillTransport skillTransport = null) : base(skillManifest.Id) { _skillManifest = skillManifest ?? throw new ArgumentNullException(nameof(SkillManifest)); _serviceClientCredentials = serviceClientCredentials ?? throw new ArgumentNullException(nameof(serviceClientCredentials)); _userState = userState; _skillTransport = skillTransport ?? new SkillWebSocketTransport(telemetryClient); _skillIntentRecognizer = skillIntentRecognizer; var intentSwitching = new WaterfallStep[] { ConfirmIntentSwitch, FinishIntentSwitch, }; if (authDialog != null) { _authDialog = authDialog; AddDialog(authDialog); } AddDialog(new WaterfallDialog(DialogIds.ConfirmSkillSwitchFlow, intentSwitching)); AddDialog(new ConfirmPrompt(DialogIds.ConfirmSkillSwitchPrompt)); }
/// <summary> /// Initializes a new instance of the <see cref="SkillDialog"/> class. /// SkillDialog constructor that accepts the manifest description of a Skill along with TelemetryClient for end to end telemetry. /// </summary> /// <param name="skillManifest">Skill manifest.</param> /// <param name="serviceClientCredentials">Service client credentials.</param> /// <param name="telemetryClient">Telemetry Client.</param> /// <param name="userState">User State.</param> /// <param name="authDialog">Auth Dialog.</param> /// <param name="skillTransport">Transport used for skill invocation.</param> public SkillDialog( SkillManifest skillManifest, IServiceClientCredentials serviceClientCredentials, IBotTelemetryClient telemetryClient, UserState userState, MultiProviderAuthDialog authDialog = null, ISkillTransport skillTransport = null) : base(skillManifest.Id) { _skillManifest = skillManifest ?? throw new ArgumentNullException(nameof(SkillManifest)); _serviceClientCredentials = serviceClientCredentials ?? throw new ArgumentNullException(nameof(serviceClientCredentials)); _telemetryClient = telemetryClient ?? throw new ArgumentNullException(nameof(telemetryClient)); _userState = userState; _skillTransport = skillTransport ?? new SkillWebSocketTransport(_skillManifest, _serviceClientCredentials); if (authDialog != null) { _authDialog = authDialog; AddDialog(authDialog); } }