Struct ExtRunnerKey
- Namespace
- MVVrus.AspNetCore.ActiveSession
- Assembly
- MVVrus.AspNetCore.ActiveSession.dll
This struct is intended to pass a runner identifier into a code external to an ActiveSession library (e.g as a part of URL).
public record struct ExtRunnerKey : IEquatable<ExtRunnerKey>
- Implements
- Inherited Members
Remarks
A purpose of this type is to avoid a mess if an ActiveSession assigned to different HTTP requests differs.
The string represetation of an identifier (returned by its ToString() method
and parseable by its static TryParse method) has the form
Constructors
- ExtRunnerKey(int, string, int)
This struct is intended to pass a runner identifier into a code external to an ActiveSession library (e.g as a part of URL).
Fields
- RunnerKeyTemplate
A regular expression pattern used to parse the string representation of a value of this type.
Properties
- ActiveSessionId
An identifier (Id property value) of the Active Session the runner belongs to.
- Generation
The Generation property value of the ActiveSession the runner belongs to.
- RunnerNumber
A number assigned to the runner within the Active Session it belongs to.
Methods
- IsForSession(IActiveSession)
Check if this instnce was issued for the ActiveSession passed as the parameter.
- Parse(string)
A static method that can be used for parsing a string representation of a value of this type.
- ToString()
Make string representation of this instance.
- TryParse(string, out ExtRunnerKey)
A static method that can be used for parsing a string representation of a value of this type.
Operators
- implicit operator ExtRunnerKey((IActiveSession ActiveSession, int RunnerNumber))
Converts a tuple of an ActiveSession reference(IActiveSession) and a runner number (int) to an ExtRunnerKey value.
- implicit operator ExtRunnerKey((int RunnerNumber, string ActiveSessionId, int Generation))
Converts a tuple of a runner number(int), an ActiveSession identifier (string) and a genration number (int) to an ExtRunnerKey value.