Class SliceAttribute
- Namespace
- Concord
- Assembly
- Concord.Emit.dll
Bounds an invoke or construction search to the code between two member-access anchors.
The by ordinal on the injection then counts matches inside that range only.
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
public sealed class SliceAttribute : Attribute
- Inheritance
-
SliceAttribute
- Inherited Members
Constructors
SliceAttribute(Type?, string?, uint, Type?, string?, uint)
Declares a range that starts after the opening anchor and ends before the closing anchor. Leave both an anchor's type and its member null to extend to that end of the body; naming one without the other is an error.
public SliceAttribute(Type? fromType = null, string? fromMember = null, uint fromBy = 1, Type? toType = null, string? toMember = null, uint toBy = 1)
Parameters
fromTypeTypeThe declaring type of the opening anchor.
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.
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.
public uint FromBy { get; }
Property Value
FromMember
The member name of the opening anchor.
public string? FromMember { get; }
Property Value
FromType
The declaring type of the opening anchor.
public Type? FromType { get; }
Property Value
ToBy
The 1-based occurrence of the closing anchor.
public uint ToBy { get; }
Property Value
ToMember
The member name of the closing anchor.
public string? ToMember { get; }
Property Value
ToType
The declaring type of the closing anchor.
public Type? ToType { get; }