Class WatsonClient
Adapted from WatsonHelper
Inheritance
System.Object
WatsonClient
Implements
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: CrashCABN.Ingestion
Assembly: CrashCABN.Ingestion.Watson.dll
Syntax
public class WatsonClient : IWatsonClient
Constructors
View SourceWatsonClient(IHttpClientFactory)
Declaration
public WatsonClient(IHttpClientFactory httpClientFactory)
Parameters
Type | Name | Description |
---|---|---|
IHttpClientFactory | httpClientFactory |
Methods
View SourceGetAnalysis(Uri)
Gets the analysis result from Watson.
Declaration
public async Task<string> GetAnalysis(Uri analysisUri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | analysisUri |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.String> | A string containing the !analyze XML output. |
GetCrashFileStream(Uri)
Opens the crash file as a stream.
Declaration
public async Task<Stream> GetCrashFileStream(Uri crashFileUri)
Parameters
Type | Name | Description |
---|---|---|
System.Uri | crashFileUri | URI for the crash. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.IO.Stream> | The stream when the file is successfully opened. |