/// <summary> /// Uploads the specified local file to specified parent folder in cloud /// </summary> /// <param name="parent">Folder in Quatrix cloud.</param> /// <param name="path">Path to local file</param> /// <returns>Instance of <see cref="Metadata"/> class which contains information about uploaded file </returns> public Metadata Upload( Metadata parent, string path ) { return parent.Upload( path ); }
/// <summary> /// Uploads the specified local file to specified parent folder in cloud with specified custom file name /// </summary> /// <param name="parent">Folder in Quatrix cloud</param> /// <param name="path">Path to local file</param> /// <param name="specifiedName">Custom file name.</param> /// <returns>Instance of <see cref="Metadata"/> class which contains information about uploaded file</returns> public Metadata Upload( Metadata parent, string path, string specifiedName ) { return parent.Upload( path, specifiedName ); }
/// <summary> /// Refreshes the specified metadata. /// </summary> /// <param name="metadata">The metadata to refresh.</param> /// <returns><see cref="Metadata"/> instance that contains information about refreshed metadata</returns> public Metadata RefreshMetadata( Metadata metadata ) { return metadata.RefreshMetadata(); }
/// <summary> /// Creates new subdir from specified metadata on cloud and with specified name /// </summary> /// <param name="folder">Parent folder </param> /// <param name="foldername">New folder name.</param> /// <returns><see cref="Metadata"/> instance which contains information about new created folder</returns> public Metadata MakeDir( Metadata folder, string foldername ) { return folder.MakeDir( foldername ); }
/// <summary> /// Gets the metadata from specified parent folder by id. /// </summary> /// <param name="parent">Parent folder.</param> /// <param name="id">Searching metadatas uuid.</param> /// <returns><see cref="Metadata"/> instance that contains information about finded metadata</returns> public Metadata GetMetadata( Metadata parent, string id ) { return parent.GetMetadata( id ); }
/// <summary> /// Search for subfile or subfolder by name, in specified folder /// </summary> /// <param name="parent">Parent folder.</param> /// <param name="name">Name of searching metadata.</param> /// <returns><see cref="Metadata"/> instance that contains information about finded metadata</returns> public Metadata FindMetadata( Metadata parent, string name ) { return parent.FindMetadata( name ); }
/// <summary> /// Initializes the basic parameters there are used to create share /// </summary> /// <param name="profile">Users profile, responsible for share creating.</param> /// <param name="folder">Folder for uploading files, prepared for share.</param> /// <param name="files">List of files, prepared for share.</param> /// <param name="contacts">Recipients email list.</param> /// <returns></returns> public bool InitMain( Profile profile, Metadata folder, IEnumerable<Metadata> files, IEnumerable<Contact> contacts ) { //Check on correct params if (profile == null || folder == null || files == null || contacts == null) { return false; } this.id = profile.id; this.folder = folder.id; //Review files files = files.Where( f => f != null ); if (files.Count() > 0) { this.files = files.Select( f => f.id ); } else { return false; } //Review contacts contacts = contacts.Where( cn => cn != null ); if (contacts.Count() > 0) { this.contacts = contacts.Select( c => c.id ); } else { return false; } return true; }