System.Runtime.Serialization.CodeGenerator.EndMethod C# (CSharp) Method

EndMethod() private method

private EndMethod ( ) : Delegate
return System.Delegate
        internal Delegate EndMethod()
        {
            MarkLabel(_methodEndLabel);
            if (_codeGenTrace != CodeGenTrace.None)
                EmitSourceLabel("} End method");
            Ret();

            Delegate retVal = null;
#if USE_REFEMIT
            Type type = typeBuilder.CreateType();
            MethodInfo method = type.GetMethod(methodBuilder.Name);
            retVal = Delegate.CreateDelegate(delegateType, method);
            methodBuilder = null;
#else
            retVal = _dynamicMethod.CreateDelegate(_delegateType);
            _dynamicMethod = null;
#endif
            _delegateType = null;

            _ilGen = null;
            _blockStack = null;
            _argList = null;
            return retVal;
        }

Usage Example

Beispiel #1
0
 public XmlFormatCollectionReaderDelegate GenerateCollectionReader(CollectionDataContract collectionContract)
 {
     _ilg = GenerateCollectionReaderHelper(collectionContract, false /*isGetOnlyCollection*/);
     ReadCollection(collectionContract);
     _ilg.Load(_objectLocal);
     _ilg.ConvertValue(_objectLocal.LocalType, _ilg.CurrentMethod.ReturnType);
     return((XmlFormatCollectionReaderDelegate)_ilg.EndMethod());
 }
All Usage Examples Of System.Runtime.Serialization.CodeGenerator::EndMethod