/// <summary> /// Invokes the given method. /// </summary> /// <param name="document"></param> /// <param name="nodeId"></param> /// <param name="interface"></param> /// <param name="method"></param> /// <param name="params"></param> void ClientInvoke(Document document, int nodeId, string @interface, string method, JObject @params) { Contract.Requires <ArgumentNullException>(document != null); Contract.Requires <ArgumentOutOfRangeException>(nodeId > 0); Contract.Requires <ArgumentException>(!string.IsNullOrWhiteSpace(@interface)); Contract.Requires <ArgumentException>(!string.IsNullOrWhiteSpace(method)); var node = (XNode)document.Xml.ResolveObjectId(nodeId); if (node == null) { return; } RemoteHelper.Invoke(node, @interface, method, @params); }