Class SliceRange
A range of a target body, expressed as two member-access anchors. An injection that carries a range matches and counts only inside it.
public sealed record SliceRange : IEquatable<SliceRange>
- Inheritance
-
SliceRange
- Implements
- Inherited Members
Constructors
SliceRange(Type?, string?, uint, Type?, string?, uint)
A range of a target body, expressed as two member-access anchors. An injection that carries a range matches and counts only inside it.
public SliceRange(Type? FromType, string? FromMember, uint FromBy, Type? ToType, string? ToMember, uint ToBy)
Parameters
FromTypeTypeThe declaring type of the opening anchor. Leave this and
FromMemberboth null to start at the body head. Naming one without the other raises CONC131.FromMemberstringThe member name of the opening anchor.
FromByuintThe 1-based occurrence of the opening anchor, counted across the whole body.
ToTypeTypeThe declaring type of the closing anchor. Leave this and
ToMemberboth null to end at the body tail. Naming one without the other raises CONC132.ToMemberstringThe member name of the closing anchor.
ToByuintThe 1-based occurrence of the closing anchor, counted across the whole body.
Properties
FromBy
The 1-based occurrence of the opening anchor, counted across the whole body.
public uint FromBy { get; init; }
Property Value
FromMember
The member name of the opening anchor.
public string? FromMember { get; init; }
Property Value
FromType
The declaring type of the opening anchor. Leave this and FromMember both null to start at the body head. Naming one without the other raises CONC131.
public Type? FromType { get; init; }
Property Value
ToBy
The 1-based occurrence of the closing anchor, counted across the whole body.
public uint ToBy { get; init; }
Property Value
ToMember
The member name of the closing anchor.
public string? ToMember { get; init; }
Property Value
ToType
The declaring type of the closing anchor. Leave this and ToMember both null to end at the body tail. Naming one without the other raises CONC132.
public Type? ToType { get; init; }