C# (CSharp) Microsoft.Cci.MutableContracts GenericMethodParameterMapper - 1 examples found. These are the top rated real world C# (CSharp) examples of Microsoft.Cci.MutableContracts.GenericMethodParameterMapper extracted from open source projects. You can rate examples to help us improve the quality of examples.
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.