Freigeben über


DeconstructionInfo Struct

Definition

The representation of a deconstruction as a tree of Deconstruct methods and conversions. Methods only appear in non-terminal nodes. All terminal nodes have a Conversion.

Here's an example: A deconstruction like (int x1, (long x2, long x3)) = deconstructable1 with Deconstructable1.Deconstruct(out int y1, out Deconstructable2 y2) and Deconstructable2.Deconstruct(out int z1, out int z2) is represented as 5 DeconstructionInfo nodes.

The top-level node has a Method (Deconstructable1.Deconstruct), no Conversion, but has two Nested nodes. Its first nested node has no Method, but has a Conversion (Identity). Its second nested node has a Method (Deconstructable2.Deconstruct), no Conversion, and two Nested nodes. Those last two nested nodes have no Method, but each have a Conversion (ImplicitNumeric, from int to long).

public value class DeconstructionInfo
public struct DeconstructionInfo
public readonly struct DeconstructionInfo
type DeconstructionInfo = struct
Public Structure DeconstructionInfo
Inheritance
DeconstructionInfo

Properties

Conversion

The conversion for a terminal position in the deconstruction tree.

Method

The Deconstruct method (if any) for this non-terminal position in the deconstruction tree.

Nested

The children for this deconstruction node.

Applies to