Westwind.WebConnection.wwDotNetBridge.InvokeMethodAsync C# (CSharp) Method

InvokeMethodAsync() public method

Invokes a method on a new thread and fires OnCompleted and OnError events on a passed in callback object.
public InvokeMethodAsync ( object callBack, object instance, string method ) : void
callBack object /// A callback object that has to have two methods: /// OnCompleted(lvResult, lcMethod) /// OnError(lcErrorMsg,loException, lcMethod) ///
instance object
method string
return void
        public void InvokeMethodAsync(object callBack, object instance, string method, params object[] parameters)
        {
            if (callBack == null || string.IsNullOrEmpty(method))
                throw new ApplicationException("You have to pass a callback object and method name.");

            var t = new Thread(_InvokeMethodAsync);

            var parms = new object[5];
            parms[0] = callBack;
            parms[1] = instance;
            parms[2] = method;
            parms[3] = parameters;
            parms[4] = false; // isStatic
            t.Start(parms);
        }
wwDotNetBridge