Show / Hide Table of Contents

Class BugFilerBase<TThis, TItem>

Inheritance
object
BugFilerBase<TThis, TItem>
ExtendedBugFilerBase<TThis, TItem>
Implements
IBugFiler<TItem, TItem>
IBugFiler
IBugSearch
IEquatable<BugFilerBase<TThis, TItem>>
Inherited Members
object.Equals(object)
object.Equals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object, object)
object.ToString()
Namespace: CrashCABN.BugFiler
Assembly: CrashCABN.BugFiler.Base.dll
Syntax
public abstract record BugFilerBase<TThis, TItem> : IBugFiler<TItem, TItem>, IBugFiler, IBugSearch, IEquatable<BugFilerBase<TThis, TItem>> where TItem : class
Type Parameters
Name Description
TThis
TItem

Constructors

View Source

BugFilerBase(BugRepositoryDetails, ILogger<TThis>)

Declaration
protected BugFilerBase(BugRepositoryDetails BugRepository, ILogger<TThis> Logger)
Parameters
Type Name Description
BugRepositoryDetails BugRepository
ILogger<TThis> Logger

Properties

View Source

BucketByField

Declaration
protected string BucketByField { get; }
Property Value
Type Description
string
View Source

BugRepository

Declaration
public BugRepositoryDetails BugRepository { get; init; }
Property Value
Type Description
BugRepositoryDetails
View Source

CrashIDField

Declaration
protected string? CrashIDField { get; }
Property Value
Type Description
string
View Source

Logger

Declaration
public ILogger<TThis> Logger { get; init; }
Property Value
Type Description
ILogger<TThis>

Methods

View Source

CreateBugAsync(IImmutableDictionary<string, MetadataItem>, IEnumerable<int>)

Create a BugItemType instance in the configured bug repository with the provided metadata.

Declaration
public virtual Task<(TItem Bug, int Id)> CreateBugAsync(IImmutableDictionary<string, MetadataItem> metadata, IEnumerable<int> duplicateBugIds)
Parameters
Type Name Description
IImmutableDictionary<string, MetadataItem> metadata

Metadata collection to use for field data.

IEnumerable<int> duplicateBugIds

An enumeration of existing, duplicate bug instance IDs.

Returns
Type Description
Task<(TItem Bug, int Id)>

The bug instance created and its ID.

View Source

CreateCrashInstanceAsync(TItem, IImmutableDictionary<string, MetadataItem>, IAttachmentContainer?, string, string)

Create a CrashInstanceItemType instance in the configured bug repository with the provided metadata.

Declaration
public virtual Task<(TItem Crash, int Id)> CreateCrashInstanceAsync(TItem parentBug, IImmutableDictionary<string, MetadataItem> metadata, IAttachmentContainer? attachments, string appName, string appVersion)
Parameters
Type Name Description
TItem parentBug

The bug instance to link.

IImmutableDictionary<string, MetadataItem> metadata

Metadata collection to use for field data.

IAttachmentContainer attachments

Attachments to include.

string appName

The name of the app associated with the crash.

string appVersion

The version of the app associated with the crash.

Returns
Type Description
Task<(TItem Bug, int Id)>

The crash instance created and its ID.

View Source

CreateItemAsync(AppliesToEnum, IImmutableDictionary<string, MetadataItem>, IAttachmentContainer?, TItem?, string?, string?)

Declaration
protected abstract Task<(TItem Item, int Id)> CreateItemAsync(AppliesToEnum crashOrBug, IImmutableDictionary<string, MetadataItem> metadata, IAttachmentContainer? attachments, TItem? parentBug, string? appName, string? appVersion)
Parameters
Type Name Description
AppliesToEnum crashOrBug
IImmutableDictionary<string, MetadataItem> metadata
IAttachmentContainer attachments
TItem parentBug
string appName
string appVersion
Returns
Type Description
Task<(TItem Bug, int Id)>
View Source

CreateMissingBucketByFieldException(string)

Declaration
protected InvalidOperationException CreateMissingBucketByFieldException(string workItemTypeName)
Parameters
Type Name Description
string workItemTypeName
Returns
Type Description
InvalidOperationException
View Source

DeleteCrashAsync(int)

Delete a CrashInstanceItemType instance in the configured bug repository.

Declaration
public abstract Task DeleteCrashAsync(int id)
Parameters
Type Name Description
int id

The crash instance ID.

Returns
Type Description
Task

A task representing the asynchronous operation.

View Source

FindMatchingBugAsync(string, string, IImmutableDictionary<string, MetadataItem>, KeyValuePair<string, IImmutableList<string>>)

Finds a BugItemType item matches the failure bucket ID of the provided crash.

Declaration
public virtual Task<BugDetails> FindMatchingBugAsync(string appName, string appVersion, IImmutableDictionary<string, MetadataItem> metadata, KeyValuePair<string, IImmutableList<string>> parentBugFilter)
Parameters
Type Name Description
string appName
string appVersion
IImmutableDictionary<string, MetadataItem> metadata
KeyValuePair<string, IImmutableList<string>> parentBugFilter
Returns
Type Description
Task<BugDetails>

The matching bug instance with room for a new crash and its ID if found, otherwise null. Also the count of matching crashes that were found for the same version. This includes being parented to the same bug as well as any other matching bug.

View Source

FindMatchingBugAsync(string, string, string, KeyValuePair<string, IImmutableList<string>>?, CancellationToken)

Declaration
public abstract Task<BugDetails> FindMatchingBugAsync(string bucket, string appName, string appVersion, KeyValuePair<string, IImmutableList<string>>? parentBugFilter, CancellationToken cancellationToken)
Parameters
Type Name Description
string bucket
string appName
string appVersion
KeyValuePair<string, IImmutableList<string>>? parentBugFilter
CancellationToken cancellationToken
Returns
Type Description
Task<BugDetails>
View Source

FindMatchingBugAsync(string, string, string, CancellationToken)

Finds a BugItemType item matches the failure bucket ID of the provided crash.

Declaration
public virtual Task<BugDetails> FindMatchingBugAsync(string bucket, string appName, string appVersion, CancellationToken cancellationToken)
Parameters
Type Name Description
string bucket
string appName
string appVersion
CancellationToken cancellationToken
Returns
Type Description
Task<BugDetails>

The matching bug instance with room for a new crash and its ID if found, otherwise null. Also the count of matching crashes that were found for the same version. This includes being parented to the same bug as well as any other matching bug.

View Source

FindMatchingCrashAsync(string, CancellationToken)

Finds a CrashInstanceItemType item a matching ID of the provided crash.

Declaration
public virtual ValueTask<bool> FindMatchingCrashAsync(string crashId, CancellationToken cancellationToken)
Parameters
Type Name Description
string crashId
CancellationToken cancellationToken
Returns
Type Description
ValueTask<bool>

True if a matching crash instance work item was found

View Source

FindMatchingCrashesAsync(string, CancellationToken)

Finds a CrashInstanceItemType item a matching ID of the provided crash.

Declaration
public virtual IAsyncEnumerable<int> FindMatchingCrashesAsync(string crashId, CancellationToken cancellationToken)
Parameters
Type Name Description
string crashId
CancellationToken cancellationToken
Returns
Type Description
IAsyncEnumerable<int>

IDs of any matching crash instances found

View Source

GetCrashById(int)

Declaration
protected abstract Task<TItem?> GetCrashById(int id)
Parameters
Type Name Description
int id
Returns
Type Description
Task<TItem>
View Source

LogCrashIDFieldNotFound(string)

Declaration
protected void LogCrashIDFieldNotFound(string workItemTypeName)
Parameters
Type Name Description
string workItemTypeName
View Source

LogFieldNotFound(string, string)

Declaration
protected void LogFieldNotFound(string workItemTypeName, string missingField)
Parameters
Type Name Description
string workItemTypeName
string missingField
View Source

QueryMatchingCrashes(string, string, bool, bool, CancellationToken)

Declaration
protected abstract IAsyncEnumerable<int> QueryMatchingCrashes(string comparisonFieldName, string comparisonFieldValue, bool returnFirstMatch = false, bool enableSearchFilter = true, CancellationToken cancellationToken = default)
Parameters
Type Name Description
string comparisonFieldName
string comparisonFieldValue
bool returnFirstMatch
bool enableSearchFilter
CancellationToken cancellationToken
Returns
Type Description
IAsyncEnumerable<int>

Implements

IBugFiler<TBug, TCrash>
IBugFiler
IBugSearch
IEquatable<T>
  • View Source
In this article
Back to top Generated by DocFX