Table of Contents

Class PatternMatchResult

Namespace
JsonApiDotNetCore.QueryStrings.FieldChains
Assembly
JsonApiDotNetCore.dll

Represents the result of matching a dot-separated resource field chain against a pattern.

[PublicAPI]
public sealed class PatternMatchResult
Inheritance
PatternMatchResult
Inherited Members

Properties

FailureMessage

Gets the match failure message, when IsSuccess is false.

public string FailureMessage { get; }

Property Value

string

FailurePosition

Gets the zero-based position in the resource field chain, or at its end, where the match failure occurred.

public int FailurePosition { get; }

Property Value

int

FieldChain

The resolved field chain, when IsSuccess is true.

public IReadOnlyList<ResourceFieldAttribute> FieldChain { get; }

Property Value

IReadOnlyList<ResourceFieldAttribute>

Remarks

The chain may be empty, if the pattern allows for that.

IsFieldChainError

Indicates whether the match failed due to an invalid field chain, irrespective of greedy matching.

public bool IsFieldChainError { get; }

Property Value

bool

IsSuccess

Indicates whether the match succeeded.

public bool IsSuccess { get; }

Property Value

bool