public static View_WS add_View(this Library_WS library, Folder_WS folder, string name) { var folderId = (folder.notNull()) ? folder.Id : Guid.Empty; var view = new View(); view.library = library.Id.str(); view.caption = name; view.id = Guid.Empty.str(); var newView = library.tmWebServices.webServices.CreateView(folderId,view); return newView.view(library, folder); }
public static Folder_WS add_Folder(this Library_WS library, Folder_WS parentFolder, string name) { var parentId = (parentFolder.notNull()) ? parentFolder.Id : Guid.Empty; var newFolder = library.tmWebServices.webServices.CreateFolder(library.Id, parentId, name); return newFolder.folder(library); }