C# (CSharp) Microsoft.Cci.MutableContracts Namespace

Сlasses

Name Description
ContractElement A common supertype providing a shared implementation used by the classes LoopInvariant, Precondition, PostCondition, and TypeInvariant.
ContractProvider An object that associates contracts, such as preconditions and postconditions, with methods, types and loops.
GenericMethodParameterMapper If the original method that contained the anonymous delegate is generic, then the code generated by the compiler, the "closure method", is also generic. If the anonymous delegate didn't capture any locals or parameters, then a (generic) static method was generated to implement the lambda. If it did capture things, then the closure method is a non-generic instance method in a generic class. In either case, any references to those generic parameters need to be mapped back to become references to the original method's generic parameters. Create an instance of this class for each anonymous delegate using the appropriate constructor. This is known from whether the closure method is (static and generic) or (instance and not-generic, but whose containing type is generic). Those are the only two patterns created by the compiler.
IteratorContracts This entire class (file) should go away when iterators are always decompiled. But if they aren't then this class finds the MoveNext method and gets any contracts that the original iterator method had, but which the compiler put into the first state of the MoveNext state machine.
IteratorContracts.HermansAlwaysRight
IteratorContracts.HermansAlwaysRight.FindLocals
IteratorContracts.HermansAlwaysRight.LocalReplacer
IteratorContracts.Replacer Substitutes all field references with the expressions that are in the captured things table passed to the constructor. Also replaces locals from the MoveNext method with new locals that belong to the interator method.
LoopContract A collection of collections of objects that describe a loop.
LoopInvariant A condition that must be true at the start of every iteration of a loop.
MethodContract A collection of collections of objects that augment the type signature of a method with additional information that describe the contract between calling method and called method.
Postcondition A condition that must be true at the end of a method.
Precondition 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.
ThrownException An exception that can be thrown by the associated method, along with a possibly empty list of postconditions that are true when that happens.
TypeContract A collection of collections of objects that augment the signature of a type with additional information that describe invariants, model variables and functions, as well as axioms.
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.