C# Class System.Xml.Xsl.IlGen.IteratorDescriptor

Iterators are joined together, are nested within each other, and reference each other. This internal class contains detailed information about iteration next labels, caching, iterator item location, etc.
Exibir arquivo Open project: gbarnett/shared-source-cli-2.0 Class Usage Examples

Public Methods

Method Description
CacheCount ( ) : void

Push the count of items in the cache onto the stack.

DiscardStack ( ) : void

Discard the current item if it is pushed onto the stack.

EnsureItemStorageType ( XmlQueryType xmlType, Type storageTypeDest ) : void

Each XmlQueryType has multiple legal CLR representations. Ensure that all items returned by this iterator are in the Clr representation specified by "storageTypeDest".

EnsureLocal ( LocalBuilder bldr ) : void

Ensure that current item is saved to the specified local variable.

EnsureLocal ( string locName ) : void

If current item is not already in a local variable, then move it to a local variable of the specified name.

EnsureLocalNoCache ( LocalBuilder bldr ) : void

Ensure that the iterator's items are not cached and that the current item is saved to the specified local variable.

EnsureLocalNoCache ( string locName ) : void

Ensure that the iterator's items are not cached, and that if the current item is not already in a local, variable, that it is moved to a local variable of the specified name.

EnsureNoCache ( ) : void

If the iterator has been fully cached, then iterate the values one-by-one.

EnsureNoStack ( string locName ) : void

If the current item is on the stack, move it to a local variable.

EnsureNoStackNoCache ( string locName ) : void

Ensure that the iterator's items are not cached, and that if the current item is pushed onto the stack, that it is moved to a local variable.

EnsureStack ( ) : void

Ensure that the current item is pushed onto the stack.

EnsureStackNoCache ( ) : void

Ensure that the iterator's items are not cached, and that the current item is pushed onto the stack.

GetLabelNext ( ) : Label

Return the label that is anchored to this code iterator's MoveNext code.

IteratorDescriptor ( GenerateHelper helper ) : System

Create a "root" IteratorDescriptor which has no parent iterator.

IteratorDescriptor ( IteratorDescriptor iterParent ) : System

Create an IteratorDescriptor that is nested in a parent iterator.

LoopToEnd ( Label lblOnEnd ) : void

Continue iteration until it is complete. Branch to "lblOnEnd" when iteration is complete.

goto LabelNextCtxt; LabelOnEnd:

PushValue ( ) : void

Push current item onto the stack without affecting Location.

SetBranching ( BranchingContext brctxt, Label lblBranch ) : void

Setup a branching context. All nested iterators compiled in this context must evaluate to a single boolean value. However, these expressions must not push the result as a boolean onto the stack. Instead, if brctxt is BranchType.True, then the expression should jump to lblBranch if it evaluates to true. If brctxt is BranchType.False, then the branch should happen if the evaluation result is false.

SetIterator ( IteratorDescriptor iterInfo ) : void

Set this iterator to be the same as the specified iterator.

SetIterator ( Label lblNext, StorageDescriptor storage ) : void

Set this iterator's next label and storage. This iterator will range over a set of values located in "storage". To get the next value, jump to "lblNext".

Private Methods

Method Description
Init ( IteratorDescriptor iterParent, GenerateHelper helper ) : void

Internal helper initializor.

Method Details

CacheCount() public method

Push the count of items in the cache onto the stack.
public CacheCount ( ) : void
return void

DiscardStack() public method

Discard the current item if it is pushed onto the stack.
public DiscardStack ( ) : void
return void

EnsureItemStorageType() public method

Each XmlQueryType has multiple legal CLR representations. Ensure that all items returned by this iterator are in the Clr representation specified by "storageTypeDest".
public EnsureItemStorageType ( XmlQueryType xmlType, Type storageTypeDest ) : void
xmlType XmlQueryType
storageTypeDest System.Type
return void

EnsureLocal() public method

Ensure that current item is saved to the specified local variable.
public EnsureLocal ( LocalBuilder bldr ) : void
bldr System.Reflection.Emit.LocalBuilder
return void

EnsureLocal() public method

If current item is not already in a local variable, then move it to a local variable of the specified name.
public EnsureLocal ( string locName ) : void
locName string
return void

EnsureLocalNoCache() public method

Ensure that the iterator's items are not cached and that the current item is saved to the specified local variable.
public EnsureLocalNoCache ( LocalBuilder bldr ) : void
bldr System.Reflection.Emit.LocalBuilder
return void

EnsureLocalNoCache() public method

Ensure that the iterator's items are not cached, and that if the current item is not already in a local, variable, that it is moved to a local variable of the specified name.
public EnsureLocalNoCache ( string locName ) : void
locName string
return void

EnsureNoCache() public method

If the iterator has been fully cached, then iterate the values one-by-one.
public EnsureNoCache ( ) : void
return void

EnsureNoStack() public method

If the current item is on the stack, move it to a local variable.
public EnsureNoStack ( string locName ) : void
locName string
return void

EnsureNoStackNoCache() public method

Ensure that the iterator's items are not cached, and that if the current item is pushed onto the stack, that it is moved to a local variable.
public EnsureNoStackNoCache ( string locName ) : void
locName string
return void

EnsureStack() public method

Ensure that the current item is pushed onto the stack.
public EnsureStack ( ) : void
return void

EnsureStackNoCache() public method

Ensure that the iterator's items are not cached, and that the current item is pushed onto the stack.
public EnsureStackNoCache ( ) : void
return void

GetLabelNext() public method

Return the label that is anchored to this code iterator's MoveNext code.
public GetLabelNext ( ) : Label
return System.Reflection.Emit.Label

IteratorDescriptor() public method

Create a "root" IteratorDescriptor which has no parent iterator.
public IteratorDescriptor ( GenerateHelper helper ) : System
helper GenerateHelper
return System

IteratorDescriptor() public method

Create an IteratorDescriptor that is nested in a parent iterator.
public IteratorDescriptor ( IteratorDescriptor iterParent ) : System
iterParent IteratorDescriptor
return System

LoopToEnd() public method

Continue iteration until it is complete. Branch to "lblOnEnd" when iteration is complete.
goto LabelNextCtxt; LabelOnEnd:
public LoopToEnd ( Label lblOnEnd ) : void
lblOnEnd System.Reflection.Emit.Label
return void

PushValue() public method

Push current item onto the stack without affecting Location.
public PushValue ( ) : void
return void

SetBranching() public method

Setup a branching context. All nested iterators compiled in this context must evaluate to a single boolean value. However, these expressions must not push the result as a boolean onto the stack. Instead, if brctxt is BranchType.True, then the expression should jump to lblBranch if it evaluates to true. If brctxt is BranchType.False, then the branch should happen if the evaluation result is false.
public SetBranching ( BranchingContext brctxt, Label lblBranch ) : void
brctxt BranchingContext
lblBranch System.Reflection.Emit.Label
return void

SetIterator() public method

Set this iterator to be the same as the specified iterator.
public SetIterator ( IteratorDescriptor iterInfo ) : void
iterInfo IteratorDescriptor
return void

SetIterator() public method

Set this iterator's next label and storage. This iterator will range over a set of values located in "storage". To get the next value, jump to "lblNext".
public SetIterator ( Label lblNext, StorageDescriptor storage ) : void
lblNext System.Reflection.Emit.Label
storage StorageDescriptor
return void