Пример #1
0
        SshUserData(Ser::SerializationInfo info, Ser::StreamingContext context)
        {
            SerializationInfoReader reader = new SerializationInfoReader(info);

            reader.GetValue("user", out this.user);
            reader.GetValue("host", out this.host);
            reader.GetValue("port", out this.port);
            reader.GetValue("pass", out this.pass, "");
            reader.GetValue("idtt", out this.idtt, "");
            reader.GetValue("psph", out this.psph, "");
            reader.GetValue("useIdentityFile", out this.useIdentityFile, false);
        }
Пример #2
0
        //==========================================================================
        // ISerializable
        //==========================================================================
        SftpAccountGw(Ser::SerializationInfo info, Ser::StreamingContext context)
        {
            this.name    = info.GetString("name");
            this.gwchain = (Gen::List <SshUserData>)info.GetValue("gwchain", typeof(Gen::List <SshUserData>));

            SerializationInfoReader reader = new SerializationInfoReader(info);

            reader.GetValue("offline", out this.s_offline, false);
            reader.GetValue("rootdir", out this.rootdir, ".");
            reader.GetValue("s_readonly", out this.s_readonly, false);
            reader.GetValue("s_reconnect_count", out this.s_reconnect_count, 1);
            reader.GetValue("s_discon_interval", out this.s_discon_interval, 300);
            reader.GetValue("s_beat_interval", out this.s_beat_interval, 60);
            int symlink;

            if (reader.GetValue("symlink", out symlink))
            {
                this.symlink = (SftpSymlink)symlink;
            }
            reader.GetValue("s_enabled", out this.s_enabled, true);
        }