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

ThisParameter() private méthode

private ThisParameter ( ) : void
Résultat void
        public void ThisParameter()
        {
            TestIL ("hello.il", module => {
                var type = module.GetType ("Foo");
                var method = type.GetMethod ("Gazonk");

                Assert.IsNotNull (method);

                AssertCode (@"
            .locals ()
            IL_0000: ldarg 0
            IL_0004: pop
            IL_0005: ret
            ", method);

                Assert.AreEqual (method.Body.ThisParameter.ParameterType, type);
                Assert.AreEqual (method.Body.ThisParameter, method.Body.Instructions [0].Operand);
            });
        }