Ejemplo n.º 1
0
        protected override object GetProperty(object target, string propName, ProxyContext proxyContext)
        {
            if (propName == null)
            {
                throw new ArgumentNullException("propName");
            }
            if (proxyContext == null)
            {
                throw new ArgumentNullException("proxyContext");
            }
            CJG site = target as CJG;

            if (site == null)
            {
                throw new ArgumentNullException("target");
            }
            propName = base.GetMemberName(propName, proxyContext);

            switch (propName)
            {
            case "FirstName":
                base.CheckBlockedGetProperty("FirstName", proxyContext);
                return(site.FirstName);
            }

            return(base.GetProperty(target, propName, proxyContext));
        }
Ejemplo n.º 2
0
        protected override object InvokeMethod(object target, string methodName, ClientValueCollection xmlargs, ProxyContext proxyContext, out bool isVoid)
        {
            if (proxyContext == null)
            {
                throw new ArgumentNullException("proxyContext");
            }
            CJG me = target as CJG;

            if (me == null)
            {
                throw new ArgumentNullException("target");
            }
            methodName = base.GetMemberName(methodName, proxyContext);

            switch (methodName)
            {
            case "Empty":
                isVoid = true;
                //base.CheckBlockedMethod("Empty", proxyContext);
                //UpdateClientObjectModelUseRemoteAPIsPermissionSetting_MethodProxy(site, xmlargs, proxyContext);
                return(null);

            case "ReturnInt":
                isVoid = true;
                //base.CheckBlockedMethod("ReturnInt", proxyContext);
                return(me.ReturnInt());

            case "ReturnDate":
                isVoid = true;
                //base.CheckBlockedMethod("ReturnDate", proxyContext);
                return(me.ReturnDate());
            }

            return(base.InvokeMethod(target, methodName, xmlargs, proxyContext, out isVoid));
        }