示例#1
0
        public void MethodLookupIsCaseInsensitive()
        {
            ServiceClass clazz = JsonRpcServices.GetClassFromType(typeof(TestService));

            Assert.IsNotNull(clazz.FindMethodByName("FOO"));
        }
示例#2
0
 public virtual ServiceClass GetClass()
 {
     return(mClass ?? (mClass = JsonRpcServices.GetClassFromType(GetType())));
 }
示例#3
0
        public void CustomServiceName()
        {
            ServiceClass clazz = JsonRpcServices.GetClassFromType(typeof(TestService));

            Assert.AreEqual("MyService", clazz.Name);
        }
示例#4
0
        public void TaggedMethodsExported()
        {
            ServiceClass clazz = JsonRpcServices.GetClassFromType(typeof(TestService));

            Assert.AreEqual(2, clazz.GetMethods().Length);
        }
示例#5
0
        public void UntaggedMethodsNotExported()
        {
            ServiceClass clazz = JsonRpcServices.GetClassFromType(typeof(EmptyService));

            Assert.AreEqual(0, clazz.GetMethods().Length);
        }
示例#6
0
        public void ServiceNameIsTypeName()
        {
            ServiceClass clazz = JsonRpcServices.GetClassFromType(typeof(EmptyService));

            Assert.AreEqual("EmptyService", clazz.Name);
        }
示例#7
0
 public void NullType()
 {
     JsonRpcServices.GetClassFromType(null);
 }