// When you start typing more interesting things like... // let a = N.T.M() // this one gets invoked... public override System.Reflection.MethodInfo[] GetMethods(System.Reflection.BindingFlags bindingAttr) { Helpers.TraceCall(); // According to the spec, we should only expect these 4, so we guard against that here! Debug.Assert(bindingAttr == (BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly), "bindingAttr has value not according to the spec!"); var m = new ArtificialMethodInfo("M", this); return(new[] { m }); }
// When you start typing more interesting things like... // let a = N.T.M() // this one gets invoked... public override System.Reflection.MethodInfo[] GetMethods(System.Reflection.BindingFlags bindingAttr) { Helpers.TraceCall(); // According to the spec, we should only expect these 4, so we guard against that here! Debug.Assert(bindingAttr == (BindingFlags.Public | BindingFlags.Instance | BindingFlags.Static | BindingFlags.DeclaredOnly), "bindingAttr has value not according to the spec!"); var m = new ArtificialMethodInfo("M", this); return new[] { m }; }