Ejemplo n.º 1
0
        public static Task <T> ExecuteAsyncCommand <T>(string command, object data)
        {
            // this method invokes a JavaScript command which has to follow this convention
            //            command = function(data, success, failure)

            // i.e.: it has to take two callbacks, one for success and one for failure.

            // the call to this command is passed through wrapperAbstractions.js to setup callback-ID
            // based handling back to C# without the dependency to pass specific function-delegates
            // into the javascript engine

            EnsureScriptComponent();
            var jsonData = GetJsonData(data);

            return(_engineWrapper.ExecuteAsyncCommand <T>(command, jsonData));
        }