System.Dynamic.DynamicObject.MetaDynamic.IsOverridden C# (CSharp) 메소드

IsOverridden() 개인적인 메소드

Checks if the derived type has overridden the specified method. If there is no implementation for the method provided then Dynamic falls back to the base class behavior which lets the call site determine how the binder is performed.
private IsOverridden ( string method ) : bool
method string
리턴 bool
            private bool IsOverridden(string method) {
                var methods = Value.GetType().GetMember(method, MemberTypes.Method, BindingFlags.Public | BindingFlags.Instance);

                foreach (MethodInfo mi in methods) {
                    if (mi.DeclaringType != typeof(DynamicObject) && mi.GetBaseDefinition().DeclaringType == typeof(DynamicObject)) {
                        return true;
                    }
                }

                return false;
            }