public void MethodSpec_3() { var s1 = new MethodSpec(typeof(NFX.Registry<NFX.ServiceModel.Service>).GetMethod("Register")); var s2 = new MethodSpec(typeof(NFX.MiscUtils).GetMethod("ToSecondsSinceUnixEpochStart")); Console.WriteLine(s1); Console.WriteLine(s2); Assert.AreNotEqual(s1, s2); Assert.AreNotEqual( s1.GetHashCode(), s2.GetHashCode()); }
public void MethodSpec_1() { var s1 = new MethodSpec(typeof(NFX.Registry<NFX.ServiceModel.Service>).GetMethod("Register")); var s2 = new MethodSpec(typeof(NFX.Registry<NFX.ServiceModel.Service>).GetMethod("Register")); Console.WriteLine(s1); Console.WriteLine(s2); Assert.AreEqual(s1, s2); Assert.AreEqual( s1.GetHashCode(), s2.GetHashCode()); }
public void MethodSpec_2() { var s1 = new MethodSpec(typeof(NFX.Registry<NFX.ServiceModel.Service>).GetMethod("Register")); var s2 = new MethodSpec(typeof(NFX.Registry<NFX.ServiceModel.Service>).GetMethod("Unregister", new Type[]{typeof(string)})); Console.WriteLine(s1); Console.WriteLine(s2); Assert.AreNotEqual(s1, s2); Assert.AreNotEqual( s1.GetHashCode(), s2.GetHashCode()); }