private static bool Command(TrackMethod method, string docKeyForTrack, string fileId = null, string callbackUrl = null, string users = null, string status = null) { Global.Logger.DebugFormat("DocService command {0} fileId '{1}' docKey '{2}' callbackUrl '{3}' users '{4}' status '{5}'", method, fileId, docKeyForTrack, callbackUrl, users, status); try { var response = DocumentServiceConnector.CommandRequest(method.ToString().ToLower(CultureInfo.InvariantCulture), docKeyForTrack, callbackUrl, users, status); Global.Logger.DebugFormat("DocService command response: '{0}'", response); var jResponse = JObject.Parse(response); var result = (CommandResultTypes)jResponse.Value <int>("error"); return(result == CommandResultTypes.NoError); } catch (Exception e) { Global.Logger.Error("DocService command error", e); return(false); } }
private static bool Command(TrackMethod method, string docKeyForTrack, string fileId = null, string callbackUrl = null, string users = null, string status = null) { Global.Logger.DebugFormat("DocService command {0} fileId '{1}' docKey '{2}' callbackUrl '{3}' users '{4}' status '{5}'", method, fileId, docKeyForTrack, callbackUrl, users, status); try { var response = DocumentServiceConnector.CommandRequest(method.ToString().ToLower(CultureInfo.InvariantCulture), docKeyForTrack, callbackUrl, users, status); Global.Logger.DebugFormat("DocService command response: '{0}'", response); var jResponse = JObject.Parse(response); var result = (CommandResultTypes) jResponse.Value<int>("error"); return result == CommandResultTypes.NoError; } catch (Exception e) { Global.Logger.Error("DocService command error", e); return false; } }