Mono.Cecil.Tests.MethodBodyTests.UnattachedMethodBody C# (CSharp) Méthode

UnattachedMethodBody() private méthode

private UnattachedMethodBody ( ) : void
Résultat void
        public void UnattachedMethodBody()
        {
            var system_void = typeof (void).ToDefinition ();
            var method = new MethodDefinition ("NewMethod", MethodAttributes.Assembly | MethodAttributes.Static, system_void);
            var body = new MethodBody (method);
            var il = body.GetILProcessor ();
            il.Emit (OpCodes.Ret);
            method.Body = body;

            Assert.AreEqual (body, method.Body);
        }