public MethodInvoker(CrossDomainRef <object> returnValue, string typeName, string methodName, params object[] arguments)
 {
     _typeName    = typeName;
     _methodName  = methodName;
     _arguments   = arguments;
     _returnValue = returnValue;
 }
        public object InvokeInstanceMethod(Type type, string methodName, params object[] args)
        {
#if !CF && !SILVERLIGHT
            CrossDomainRef <object> returnValue = new CrossDomainRef <object>();
            _domain.DoCallBack(new MethodInvoker(returnValue, ReflectPlatform.FullyQualifiedName(type), methodName, args).InvokeInstanceMethod);
            return(returnValue.Value);
#else
            return(null);
#endif
        }
        private string GetVersion()
        {
#if !CF && !SILVERLIGHT
            CrossDomainRef <object> returnValue = new CrossDomainRef <object>();
            _domain.DoCallBack(new MethodInvoker(returnValue, ReflectPlatform.FullyQualifiedName(typeof(Db4oFactory)), "Version").InvokeStaticMethod);
            return((string)returnValue.Value);
#else
            return(null);
#endif
        }