public override string Invoke(string[] args) { try { if (args == null) { throw new Exception("Input parameter 'args' is null."); } if (args.Length != 1) { throw new Exception("Input parameter 'args' length does not equal 1."); } string fileId = args[0]; FileInfo fileInfo = Invoke(fileId); if (fileInfo == null) { return(""); } return(fileInfo.ToString()); } catch (Exception exception) { StatusForm.Exception(exception); Log.Error(exception); return(null); } }
public override string Invoke(string[] args) { try { Invoke(); return(""); } catch (Exception exception) { StatusForm.Exception(exception); Log.Error(exception); return(null); } }
public FileInfo Invoke(string parentId, string title, bool isFolder) { try { if (isFolder) { return(Invoke(parentId, title, DriveService.MimeType.Folder)); } return(Invoke(parentId, title, null)); } catch (Exception exception) { StatusForm.Exception(exception); Log.Error(exception); return(null); } }
public override string Invoke(string[] args) { try { if (args == null) { throw new Exception("Input parameter 'args' is null."); } if (args.Length != 2 && args.Length != 3) { throw new Exception("Input parameter 'args' length does not equal 2 or 3."); } string fileId = args[0]; string title = args[1]; string mimeType = null; if (args.Length > 2) { mimeType = args[2]; } FileInfo fileInfo = Invoke(fileId, title, mimeType); if (fileInfo == null) { return(""); } return(fileInfo.ToString()); } catch (Exception exception) { StatusForm.Exception(exception); Log.Error(exception); return(null); } }
public override string Invoke(string[] args) { try { if (args == null) { throw new Exception("Input parameter 'args' is null."); } if (args.Length < 1) { throw new Exception("Input parameter 'args' length is less than 1."); } string parentId = args[0]; List <string> ids = GetFileIds(args, 1); List <string> movedIds = Invoke(parentId, ids); if (movedIds == null) { return(""); } string result = GetFileIdsAsXml(movedIds); return(result); } catch (Exception exception) { StatusForm.Exception(exception); Log.Error(exception); return(null); } }
public override string Invoke(string[] args) { try { if (args == null) { throw new Exception("Input parameter 'args' is null."); } if (args.Length < 2) { throw new Exception("Input parameter 'args' length is less than 2."); } List <string> ids = GetFileIds(args, 0); List <string> untrashedIds = Invoke(ids); if (untrashedIds == null) { return(""); } string result = GetFileIdsAsXml(untrashedIds); return(result); } catch (Exception exception) { StatusForm.Exception(exception); Log.Error(exception); return(null); } }
public override string Invoke(string[] args) { try { if (args == null) { throw new Exception("Input parameter 'args' is null."); } if (args.Length != 5) { throw new Exception("Input parameter 'args' length does not equal 5."); } string fileId = args[0]; bool ignoreTrash = true; bool updateCachedData = false; bool getChildren = true; bool ignoreError = true; if (args[1] == "0" || args[1].ToLower() == "false") { ignoreTrash = false; } if (args[2] == "1" || args[2].ToLower() == "true") { updateCachedData = true; } if (args[3] == "0" || args[3].ToLower() == "false") { getChildren = false; } if (args[4] == "0" || args[4].ToLower() == "false") { ignoreError = false; } FileInfo fileInfo = null; try { fileInfo = Invoke(fileId, ignoreTrash, updateCachedData, getChildren); if (fileInfo == null) { return(""); } } catch (Exception exception) { if (!ignoreError) { StatusForm.Exception(exception); } throw exception; } return(fileInfo.ToString()); } catch (Exception exception) { Log.Error(exception); return(null); } }