C# Class Microsoft.Cci.MutableContracts.ContractProvider

An object that associates contracts, such as preconditions and postconditions, with methods, types and loops.
Inheritance: IContractProvider
Show file Open project: visualmutator/visualmutator Class Usage Examples

Public Methods

Method Description
AssociateLoopWithContract ( object loop, ILoopContract contract ) : void

Associates the given object with the given loop contract. If the object is already associated with a loop contract, that association will be lost as a result of this call.

AssociateMethodWithContract ( object method, IMethodContract contract ) : void

Associates the given object with the given method contract. If the object is already associated with a method contract, that association will be lost as a result of this call.

AssociateTriggersWithQuantifier ( object quantifier, IEnumerable triggers ) : void

Associates the given object with the given list of triggers. If the object is already associated with a list of triggers, that association will be lost as a result of this call.

AssociateTypeWithContract ( object type, ITypeContract contract ) : void

Associates the given object with the given type contract. If the object is already associated with a type contract, that association will be lost as a result of this call.

ContractProvider ( IContractMethods contractMethods, IUnit unit ) : System

Allocates an object that associates contracts, such as preconditions and postconditions, with methods, types and loops. If the object is already associated with a contract, that association will be lost as a result of this call.

GetLoopContractFor ( object loop ) : ILoopContract

Returns the loop contract, if any, that has been associated with the given object. Returns null if no association exits.

GetMethodContractFor ( object method ) : IMethodContract

Returns the method contract, if any, that has been associated with the given object. Returns null if no association exits.

GetTriggersFor ( object quantifier ) : IEnumerable>

Returns the triggers, if any, that have been associated with the given object. Returns null if no association exits.

GetTypeContractFor ( object type ) : ITypeContract

Returns the type contract, if any, that has been associated with the given object. Returns null if no association exits.

UnassociateLoopWithContract ( object loop ) : void

Removes the association of the given object with the loop contract.

UnassociateMethodWithContract ( object method ) : void

Removes the association of the given object with the method contract.

UnassociateTriggersWithQuantifier ( object quantifier ) : void

Removes the association of the given object with the list of triggers.

UnassociateTypeWithContract ( object type ) : void

Removes the association of the given object with the type contract.

Method Details

AssociateLoopWithContract() public method

Associates the given object with the given loop contract. If the object is already associated with a loop contract, that association will be lost as a result of this call.
public AssociateLoopWithContract ( object loop, ILoopContract contract ) : void
loop object An object to associate with the loop contract. This can be any kind of object.
contract ILoopContract The contract to associate with loop.
return void

AssociateMethodWithContract() public method

Associates the given object with the given method contract. If the object is already associated with a method contract, that association will be lost as a result of this call.
public AssociateMethodWithContract ( object method, IMethodContract contract ) : void
method object An object to associate with the method contract. This can be any kind of object.
contract IMethodContract The contract to associate with method.
return void

AssociateTriggersWithQuantifier() public method

Associates the given object with the given list of triggers. If the object is already associated with a list of triggers, that association will be lost as a result of this call.
public AssociateTriggersWithQuantifier ( object quantifier, IEnumerable triggers ) : void
quantifier object An object to associate with the triggers. This can be any kind of object.
triggers IEnumerable One or more groups of expressions that trigger the instantiation of a quantifier by the theorem prover.
return void

AssociateTypeWithContract() public method

Associates the given object with the given type contract. If the object is already associated with a type contract, that association will be lost as a result of this call.
public AssociateTypeWithContract ( object type, ITypeContract contract ) : void
type object An object to associate with the type contract. This can be any kind of object.
contract ITypeContract The contract to associate with type.
return void

ContractProvider() public method

Allocates an object that associates contracts, such as preconditions and postconditions, with methods, types and loops. If the object is already associated with a contract, that association will be lost as a result of this call.
public ContractProvider ( IContractMethods contractMethods, IUnit unit ) : System
contractMethods IContractMethods A collection of methods that can be called in a way that provides tools with information about contracts.
unit IUnit The unit that this is a contract provider for.
return System

GetLoopContractFor() public method

Returns the loop contract, if any, that has been associated with the given object. Returns null if no association exits.
public GetLoopContractFor ( object loop ) : ILoopContract
loop object An object that might have been associated with a loop contract. This can be any kind of object.
return ILoopContract

GetMethodContractFor() public method

Returns the method contract, if any, that has been associated with the given object. Returns null if no association exits.
public GetMethodContractFor ( object method ) : IMethodContract
method object An object that might have been associated with a method contract. This can be any kind of object.
return IMethodContract

GetTriggersFor() public method

Returns the triggers, if any, that have been associated with the given object. Returns null if no association exits.
public GetTriggersFor ( object quantifier ) : IEnumerable>
quantifier object An object that might have been associated with triggers. This can be any kind of object.
return IEnumerable>

GetTypeContractFor() public method

Returns the type contract, if any, that has been associated with the given object. Returns null if no association exits.
public GetTypeContractFor ( object type ) : ITypeContract
type object An object that might have been associated with a type contract. This can be any kind of object.
return ITypeContract

UnassociateLoopWithContract() public method

Removes the association of the given object with the loop contract.
public UnassociateLoopWithContract ( object loop ) : void
loop object The object to remove the association with the loop contract. This can be any kind of object.
return void

UnassociateMethodWithContract() public method

Removes the association of the given object with the method contract.
public UnassociateMethodWithContract ( object method ) : void
method object The object to remove the association with the method contract. This can be any kind of object.
return void

UnassociateTriggersWithQuantifier() public method

Removes the association of the given object with the list of triggers.
public UnassociateTriggersWithQuantifier ( object quantifier ) : void
quantifier object The object to remove the association with the list of triggers. This can be any kind of object.
return void

UnassociateTypeWithContract() public method

Removes the association of the given object with the type contract.
public UnassociateTypeWithContract ( object type ) : void
type object The object to remove the association with the type contract. This can be any kind of object.
return void