public static bool Command(CommandMethod method, string docKeyForTrack, object fileId = null, string callbackUrl = null, string[] users = null, Web.Core.Files.DocumentService.MetaData meta = null) { Global.Logger.DebugFormat("DocService command {0} fileId '{1}' docKey '{2}' callbackUrl '{3}' users '{4}' meta '{5}'", method, fileId, docKeyForTrack, callbackUrl, users != null ? string.Join(", ", users) : null, JsonConvert.SerializeObject(meta)); try { string version; var result = Web.Core.Files.DocumentService.CommandRequest( FilesLinkUtility.DocServiceCommandUrl, method, GenerateRevisionId(docKeyForTrack), callbackUrl, users, meta, FileUtility.SignatureSecret, out version); if (result == Web.Core.Files.DocumentService.CommandResultTypes.NoError) { return(true); } Global.Logger.ErrorFormat("DocService command response: '{0}'", result); } catch (Exception e) { Global.Logger.Error("DocService command error", e); } return(false); }
public static bool Command(CommandMethod method, string docKeyForTrack, object 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 result = GetDocumentService().CommandRequest( FilesLinkUtility.DocServiceCommandUrl, method, GenerateRevisionId(docKeyForTrack), callbackUrl, users, status); if (result == Web.Core.Files.DocumentService.CommandResultTypes.NoError) { return(true); } Global.Logger.ErrorFormat("DocService command response: '{0}'", result); } catch (Exception e) { Global.Logger.Error("DocService command error", e); } return(false); }