/// <summary> /// fires an SSIS event /// </summary> /// <param name="ComponentMetaData">componets SSIS metadata</param> /// <param name="eventType">event type</param> /// <param name="sqlType">sql type (always</param> /// <param name="description">SSIS event description</param> private static void Fire(IDTSComponentMetaData100 ComponentMetaData, Type eventType, int sqlType, string description) { bool cancel = false; switch (eventType) { case Type.Information: ComponentMetaData.FireInformation(sqlType, ComponentMetaData.Name, description, "", 0, ref cancel); break; case Type.Progress: throw new NotImplementedException("Progress messages are not implemented"); case Type.Warning: ComponentMetaData.FireWarning(sqlType, ComponentMetaData.Name, description, string.Empty, 0); break; case Type.Error: ComponentMetaData.FireError(sqlType, ComponentMetaData.Name, description, string.Empty, 0, out cancel); break; default: ComponentMetaData.FireError(sqlType, ComponentMetaData.Name, description, string.Empty, 0, out cancel); break; } }
/// <summary> /// Invoked when the speech client receives a phrase recognition result(s) from the server. /// </summary> /// <param name="args">The recognition result.</param> /// <returns> /// A task /// </returns> public Task OnRecognitionResultAsync(RecognitionResult args) { var response = args; bool pbFireAgain = true; _componentMetaData.FireInformation(0, "OnRecognitionResultAsync", string.Format("***** Phrase Recognition Status = [{0}] ***", response.RecognitionStatus), string.Empty, 0, ref pbFireAgain); if (response.Phrases != null) { foreach (var result in response.Phrases) { recognitionResults.Add(string.Format("{0} (Confidence:{1})", result.DisplayText, result.Confidence)); } } return(CompletedTask); }