Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[textanalytics] Add Debug Proxy class for ExtractKeyPhrasesResultCollection #18690

Merged
merged 4 commits into from
Feb 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@

using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Linq;

namespace Azure.AI.TextAnalytics
{
/// <summary>
/// Collection of <see cref="AnalyzeHealthcareEntitiesResult"/> objects corresponding
/// to a batch of documents, and information about the batch operation.
/// </summary>
[DebuggerTypeProxy(typeof(AnalyzeHealthcareEntitiesResultCollectionDebugView))]
public class AnalyzeHealthcareEntitiesResultCollection : ReadOnlyCollection<AnalyzeHealthcareEntitiesResult>
{
/// <summary>
Expand All @@ -35,5 +38,43 @@ internal AnalyzeHealthcareEntitiesResultCollection(IList<AnalyzeHealthcareEntiti
/// on this batch of documents.
/// </summary>
public string ModelVersion { get; }

/// <summary>
/// Debugger Proxy class for <see cref="AnalyzeHealthcareEntitiesResultCollection"/>.
/// </summary>
internal class AnalyzeHealthcareEntitiesResultCollectionDebugView
{
private AnalyzeHealthcareEntitiesResultCollection BaseCollection { get; }

public AnalyzeHealthcareEntitiesResultCollectionDebugView(AnalyzeHealthcareEntitiesResultCollection collection)
{
BaseCollection = collection;
}

[DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
public List<AnalyzeHealthcareEntitiesResult> Items
{
get
{
return BaseCollection.ToList();
}
}

public TextDocumentBatchStatistics Statistics
{
get
{
return BaseCollection.Statistics;
}
}

public string ModelVersion
{
get
{
return BaseCollection.ModelVersion;
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@

using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Linq;

namespace Azure.AI.TextAnalytics
{
/// <summary>
/// Collection of <see cref="AnalyzeSentimentResult"/> objects corresponding
/// to a batch of documents, and information about the batch operation.
/// </summary>
[DebuggerTypeProxy(typeof(AnalyzeSentimentResultCollectionDebugView))]
public class AnalyzeSentimentResultCollection : ReadOnlyCollection<AnalyzeSentimentResult>
{
internal AnalyzeSentimentResultCollection(IList<AnalyzeSentimentResult> list, TextDocumentBatchStatistics statistics, string modelVersion) : base(list)
Expand All @@ -30,5 +33,43 @@ internal AnalyzeSentimentResultCollection(IList<AnalyzeSentimentResult> list, Te
/// on this batch of documents.
/// </summary>
public string ModelVersion { get; }

/// <summary>
/// Debugger Proxy class for <see cref="AnalyzeSentimentResultCollection"/>.
/// </summary>
internal class AnalyzeSentimentResultCollectionDebugView
{
private AnalyzeSentimentResultCollection BaseCollection { get; }

public AnalyzeSentimentResultCollectionDebugView(AnalyzeSentimentResultCollection collection)
{
BaseCollection = collection;
}

[DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
public List<AnalyzeSentimentResult> Items
{
get
{
return BaseCollection.ToList();
}
}

public TextDocumentBatchStatistics Statistics
{
get
{
return BaseCollection.Statistics;
}
}

public string ModelVersion
{
get
{
return BaseCollection.ModelVersion;
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@

using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Linq;

namespace Azure.AI.TextAnalytics
{
/// <summary>
/// Collection of <see cref="CategorizedEntity"/> objects in a document,
/// and warnings encountered while processing the document.
/// </summary>
[DebuggerTypeProxy(typeof(CategorizedEntityCollectionDebugView))]
public class CategorizedEntityCollection : ReadOnlyCollection<CategorizedEntity>
{
internal CategorizedEntityCollection(IList<CategorizedEntity> entities, IList<TextAnalyticsWarning> warnings)
Expand All @@ -22,5 +25,35 @@ internal CategorizedEntityCollection(IList<CategorizedEntity> entities, IList<Te
/// Warnings encountered while processing the document.
/// </summary>
public IReadOnlyCollection<TextAnalyticsWarning> Warnings { get; }

/// <summary>
/// Debugger Proxy class for <see cref="CategorizedEntityCollection"/>.
/// </summary>
internal class CategorizedEntityCollectionDebugView
{
private CategorizedEntityCollection BaseCollection { get; }

public CategorizedEntityCollectionDebugView(CategorizedEntityCollection collection)
{
BaseCollection = collection;
}

[DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
public List<CategorizedEntity> Items
{
get
{
return BaseCollection.ToList();
}
}

public IReadOnlyCollection<TextAnalyticsWarning> Warnings
{
get
{
return BaseCollection.Warnings;
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@

using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Linq;

namespace Azure.AI.TextAnalytics
{
/// <summary>
/// Collection of <see cref="DetectLanguageResult"/> objects corresponding
/// to a batch of documents, and information about the batch operation.
/// </summary>
[DebuggerTypeProxy(typeof(DetectLanguageResultCollectionDebugView))]
public class DetectLanguageResultCollection : ReadOnlyCollection<DetectLanguageResult>
{
/// <summary>
Expand All @@ -35,5 +38,43 @@ internal DetectLanguageResultCollection(IList<DetectLanguageResult> list, TextDo
/// on this batch of documents.
/// </summary>
public string ModelVersion { get; }

/// <summary>
/// Debugger Proxy class for <see cref="DetectLanguageResultCollection"/>.
/// </summary>
internal class DetectLanguageResultCollectionDebugView
{
private DetectLanguageResultCollection BaseCollection { get; }

public DetectLanguageResultCollectionDebugView(DetectLanguageResultCollection collection)
{
BaseCollection = collection;
}

[DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
public List<DetectLanguageResult> Items
{
get
{
return BaseCollection.ToList();
}
}

public TextDocumentBatchStatistics Statistics
{
get
{
return BaseCollection.Statistics;
}
}

public string ModelVersion
{
get
{
return BaseCollection.ModelVersion;
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@

using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Linq;

namespace Azure.AI.TextAnalytics
{
/// <summary>
/// Collection of <see cref="ExtractKeyPhrasesResult"/> objects corresponding
/// to a batch of documents, and information about the batch operation.
/// </summary>
[DebuggerTypeProxy(typeof(ExtractKeyPhrasesResultCollectionDebugView))]
public class ExtractKeyPhrasesResultCollection : ReadOnlyCollection<ExtractKeyPhrasesResult>
{
internal ExtractKeyPhrasesResultCollection(IList<ExtractKeyPhrasesResult> list, TextDocumentBatchStatistics statistics, string modelVersion) : base(list)
Expand All @@ -30,5 +33,43 @@ internal ExtractKeyPhrasesResultCollection(IList<ExtractKeyPhrasesResult> list,
/// on this batch of documents.
/// </summary>
public string ModelVersion { get; }

/// <summary>
/// Debugger Proxy class for <see cref="ExtractKeyPhrasesResultCollection"/>.
/// </summary>
internal class ExtractKeyPhrasesResultCollectionDebugView
{
private ExtractKeyPhrasesResultCollection BaseCollection { get; }

public ExtractKeyPhrasesResultCollectionDebugView(ExtractKeyPhrasesResultCollection collection)
{
BaseCollection = collection;
}

[DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
public List<ExtractKeyPhrasesResult> Items
{
get
{
return BaseCollection.ToList();
}
}

public TextDocumentBatchStatistics Statistics
{
get
{
return BaseCollection.Statistics;
}
}

public string ModelVersion
{
get
{
return BaseCollection.ModelVersion;
}
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,16 @@

using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.Diagnostics;
using System.Linq;

namespace Azure.AI.TextAnalytics
{
/// <summary>
/// Collection of key phrases present in a document,
/// and warnings encountered while processing the document.
/// </summary>
[DebuggerTypeProxy(typeof(KeyPhraseCollectionDebugView))]
public class KeyPhraseCollection : ReadOnlyCollection<string>
{
internal KeyPhraseCollection(IList<string> keyPhrases, IList<TextAnalyticsWarning> warnings)
Expand All @@ -22,5 +25,35 @@ internal KeyPhraseCollection(IList<string> keyPhrases, IList<TextAnalyticsWarnin
/// Warnings encountered while processing the document.
/// </summary>
public IReadOnlyCollection<TextAnalyticsWarning> Warnings { get; }

/// <summary>
/// Debugger Proxy class for <see cref="KeyPhraseCollection"/>.
/// </summary>
internal class KeyPhraseCollectionDebugView
{
private KeyPhraseCollection BaseCollection { get; }

public KeyPhraseCollectionDebugView(KeyPhraseCollection collection)
{
BaseCollection = collection;
}

[DebuggerBrowsable(DebuggerBrowsableState.RootHidden)]
public List<string> Items
{
get
{
return BaseCollection.ToList();
}
}

public IReadOnlyCollection<TextAnalyticsWarning> Warnings
{
get
{
return BaseCollection.Warnings;
}
}
}
}
}
Loading