C# Class NStub.CSharp.ObjectGeneration.FluentCodeBuild.CodeLocalVariableBinder

Build a local variable from fluent parameters.
Mostra file Open project: Jedzia/NStub Class Usage Examples

Private Properties

Property Type Description
CodeLocalVariableBinder System
CodeLocalVariableBinder System
Commit System.CodeDom.CodeMemberMethod

Public Methods

Method Description
Assign ( ) : CodeLocalVariableBinder

Completes the creation of the reference type with an assignment of a member field.

Commit ( ) : CodeMemberMethod

Completes the creation of the reference type.

StaticClass ( string className ) : CodeTypeReferenceBinder

Add a reference to a static class to the method body. Like 'Assert' or 'DateTime'.

With ( object value ) : CodeLocalVariableBinder

Add a primitive parameter to the method invocation.

Private Methods

Method Description
CodeLocalVariableBinder ( CodeMemberMethod method, CodeVariableDeclarationStatement variableDeclaration ) : System

Initializes a new instance of the CodeLocalVariableBinder class with a local variable declaration.

CodeLocalVariableBinder ( CodeMemberMethod method, CodeVariableReferenceExpression reference ) : System

Initializes a new instance of the CodeLocalVariableBinder class with a reference to a variable.

Commit ( CodeTypeReferenceBinder binder ) : CodeMemberMethod

Completes the creation of the reference type from a CodeTypeReferenceBinder build reference.

Method Details

Assign() public method

Completes the creation of the reference type with an assignment of a member field.
public Assign ( ) : CodeLocalVariableBinder
return CodeLocalVariableBinder

Commit() public method

Completes the creation of the reference type.
Cannot add not assigned local variable to a method.Use /// (...) or (...) to specify a initialization expression.
public Commit ( ) : CodeMemberMethod
return System.CodeDom.CodeMemberMethod

StaticClass() public method

Add a reference to a static class to the method body. Like 'Assert' or 'DateTime'.
public StaticClass ( string className ) : CodeTypeReferenceBinder
className string Name of the class.
return CodeTypeReferenceBinder

With() public method

Add a primitive parameter to the method invocation.
public With ( object value ) : CodeLocalVariableBinder
value object The object to represent by the primitive expression.
return CodeLocalVariableBinder