IsNativeMethod() public method

public IsNativeMethod ( string name ) : bool
name string
return bool
Beispiel #1
0
        public void DetectNativeMethods()
        {
            DynamicObject dynobj = new DynamicObject();

            Assert.IsTrue(dynobj.IsNativeMethod("ToString"));
            Assert.IsTrue(dynobj.IsNativeMethod("GetHashCode"));
            Assert.IsTrue(dynobj.IsNativeMethod("Equals"));

            Assert.IsTrue(dynobj.IsNativeMethod("GetValue"));
            Assert.IsTrue(dynobj.IsNativeMethod("SetValue"));
            Assert.IsTrue(dynobj.IsNativeMethod("GetNames"));
            Assert.IsTrue(dynobj.IsNativeMethod("Invoke"));

            Assert.IsFalse(dynobj.IsNativeMethod("Foo"));
        }