C# 클래스 Microsoft.Cci.Ast.TypeInvariant

A condition that must be true after an object has been constructed and that is by default a part of the precondition and postcondition of every public method of the associated type.
상속: Invariant, ITypeInvariant
파일 보기 프로젝트 열기: visualmutator/visualmutator 1 사용 예제들

Private Properties

프로퍼티 타입 설명

공개 메소드들

메소드 설명
Dispatch ( ICodeAndContractVisitor visitor ) : void

Calls visitor.Visit(ITypeInvariant).

Dispatch ( SourceVisitor visitor ) : void

Calls visitor.Visit(TypeInvariant).

MakeCopyFor ( BlockStatement containingBlock ) : TypeInvariant

Makes a copy of this type invariant, changing the containing block to the given block.

SetContainingExpression ( Expression containingExpression ) : void

Completes the two stage construction of this object. This allows bottom up parsers to construct an Expression before constructing the containing Expression. This method should be called once only and must be called before this object is made available to client code. The construction code itself should also take care not to call any other methods or property/event accessors on the object until after this method has been called.

TypeInvariant ( Microsoft.Cci.Ast.NameDeclaration name, Expression condition, bool isAxiom, ISourceLocation sourceLocation ) : System.Collections.Generic

Allocates a condition that must be true at the start of a method, possibly bundled with an exception that will be thrown if the condition does not hold.

보호된 메소드들

메소드 설명
TypeInvariant ( BlockStatement containingBlock, TypeInvariant template ) : System.Collections.Generic

A copy constructor that allocates an instance that is the same as the given template, except for its containing block.

메소드 상세

Dispatch() 공개 메소드

Calls visitor.Visit(ITypeInvariant).
public Dispatch ( ICodeAndContractVisitor visitor ) : void
visitor ICodeAndContractVisitor
리턴 void

Dispatch() 공개 메소드

Calls visitor.Visit(TypeInvariant).
public Dispatch ( SourceVisitor visitor ) : void
visitor SourceVisitor
리턴 void

MakeCopyFor() 공개 메소드

Makes a copy of this type invariant, changing the containing block to the given block.
public MakeCopyFor ( BlockStatement containingBlock ) : TypeInvariant
containingBlock BlockStatement
리턴 TypeInvariant

SetContainingExpression() 공개 메소드

Completes the two stage construction of this object. This allows bottom up parsers to construct an Expression before constructing the containing Expression. This method should be called once only and must be called before this object is made available to client code. The construction code itself should also take care not to call any other methods or property/event accessors on the object until after this method has been called.
public SetContainingExpression ( Expression containingExpression ) : void
containingExpression Expression
리턴 void

TypeInvariant() 보호된 메소드

A copy constructor that allocates an instance that is the same as the given template, except for its containing block.
protected TypeInvariant ( BlockStatement containingBlock, TypeInvariant template ) : System.Collections.Generic
containingBlock BlockStatement The containing block of the copied type invariant. This should be different from the containing block of the template.
template TypeInvariant The statement to copy.
리턴 System.Collections.Generic

TypeInvariant() 공개 메소드

Allocates a condition that must be true at the start of a method, possibly bundled with an exception that will be thrown if the condition does not hold.
public TypeInvariant ( Microsoft.Cci.Ast.NameDeclaration name, Expression condition, bool isAxiom, ISourceLocation sourceLocation ) : System.Collections.Generic
name Microsoft.Cci.Ast.NameDeclaration The name of the axiom. Used in error diagnostics. May be null.
condition Expression The condition that must be true at the start of the method that is associated with this Precondition instance.
isAxiom bool An axiom is a type invariant whose truth is assumed rather than derived. Commonly used to make statements about the meaning of contract methods.
sourceLocation ISourceLocation The source location corresponding to the newly allocated source item.
리턴 System.Collections.Generic