Ejemplo n.º 1
0
 internal FolderBase(SOAPFolder folder)
 {
     ID = folder.folder_id;
     Name = folder.folder_name;
     FolderTypeID = folder.folder_type_id;
     ParentFolderID = folder.parent_folder_id;
     Password = folder.password;
     Path = folder.path;
     PublicName = folder.public_name;
     IsShared = folder.shared == 1;
     OwnerID = folder.user_id;
 }
Ejemplo n.º 2
0
        public void TestConstructor()
        {
            const long folderID = 375235982;
            string folderName = Guid.NewGuid().ToString();
            const long folderTypeID = 21;
            const long parentFolderID = 3451;
            string password = Guid.NewGuid().ToString();
            string path = Guid.NewGuid().ToString();
            string publicName = Guid.NewGuid().ToString();
            const int shared = 1;
            const int userID = 124124;

            SOAPFolder soapFolder = new SOAPFolder
                                        {
                                            folder_id = folderID,
                                            folder_name = folderName,
                                            folder_type_id = folderTypeID,
                                            parent_folder_id = parentFolderID,
                                            password = password,
                                            path = path,
                                            public_name = publicName,
                                            shared = shared,
                                            user_id = userID
                                        };

            FolderBase folder = new FolderBase(soapFolder);

            Assert.AreEqual(folderID, folder.ID);
            StringAssert.IsMatch(folderName, folder.Name);
            Assert.AreEqual(folderTypeID, folder.FolderTypeID);
            Assert.AreEqual(parentFolderID, folder.ParentFolderID);
            StringAssert.IsMatch(password, folder.Password);
            StringAssert.IsMatch(path, folder.Path);
            StringAssert.IsMatch(publicName, folder.PublicName);
            Assert.IsTrue(folder.IsShared.HasValue);
            Assert.IsTrue(folder.IsShared.Value);
            Assert.AreEqual(userID, folder.OwnerID);
        }
Ejemplo n.º 3
0
 internal Folder(SOAPFolder folder)
     : base(folder)
 {
 }
Ejemplo n.º 4
0
 /// <remarks/>
 public string Endcreate_folder(System.IAsyncResult asyncResult, out SOAPFolder folder)
 {
     object[] results = this.EndInvoke(asyncResult);
     folder = ((SOAPFolder)(results[1]));
     return ((string)(results[0]));
 }
Ejemplo n.º 5
0
 public string create_folder(string api_key, string auth_token, long parent_id, string name, long share, out SOAPFolder folder)
 {
     object[] results = this.Invoke("create_folder", new object[] {
                 api_key,
                 auth_token,
                 parent_id,
                 name,
                 share});
     folder = ((SOAPFolder)(results[1]));
     return ((string)(results[0]));
 }