Exemplo n.º 1
0
        /// <summary>FTPSを終了し、アーカイブを利用可能な状態にします。
        ///
        /// <returns>this</returns>
        /// </summary>
        public Archive CloseFtp()
        {
            string path = this._ApiPath() + "/" + Util.UrlEncode(this._Id()) + "/ftp";

            this._Client.Request("DELETE", path);
            this._FtpInfo = null;
            return(this);
        }
Exemplo n.º 2
0
 internal override void _OnAfterApiDeserialize(object r, object root)
 {
     if (root != null)
     {
         if ((root as System.Collections.Generic.Dictionary <string, object>).ContainsKey("FTPServer"))
         {
             object ftp = (root as System.Collections.Generic.Dictionary <string, object>)["FTPServer"];
             if (ftp != null)
             {
                 this._FtpInfo = new FtpInfo(ftp);
             }
         }
     }
     if (r != null)
     {
         if ((r as System.Collections.Generic.Dictionary <string, object>).ContainsKey("SourceArchive"))
         {
             object s = (r as System.Collections.Generic.Dictionary <string, object>)["SourceArchive"];
             if (s != null)
             {
                 object id = (s as System.Collections.Generic.Dictionary <string, object>)["ID"];
                 if (id != null)
                 {
                     this._Source = new Archive(this._Client, s);
                 }
             }
         }
         if ((r as System.Collections.Generic.Dictionary <string, object>).ContainsKey("SourceDisk"))
         {
             object s = (r as System.Collections.Generic.Dictionary <string, object>)["SourceDisk"];
             if (s != null)
             {
                 object id = (s as System.Collections.Generic.Dictionary <string, object>)["ID"];
                 if (id != null)
                 {
                     this._Source = Resource.CreateWith("Disk", this._Client, s);
                 }
             }
         }
     }
 }