Example #1
0
        private void _read()
        {
            _keyName = new Cstring(m_io, this, m_root);
            switch (KeyName.Value)
            {
            case "ssh-rsa": {
                _body = new KeyRsa(m_io, this, m_root);
                break;
            }

            case "ecdsa-sha2-nistp256": {
                _body = new KeyEcdsa(m_io, this, m_root);
                break;
            }

            case "ssh-ed25519": {
                _body = new KeyEd25519(m_io, this, m_root);
                break;
            }

            case "ssh-dss": {
                _body = new KeyDsa(m_io, this, m_root);
                break;
            }
            }
        }
Example #2
0
    public ReadFile()
    {
        Cstring FilenameTemp = GetTempFileName();

        int nModifications = 0;

        // Read the file and display it line by line.
        System.IO.StreamReader file =
            new System.IO.StreamReader(Filename);
        System.IO.StreamWriter fileOut =
            new System.IO.StreamWriter(FilenameTempp);

        while ((line = file.ReadLine()) != null)
        {
            String strExpanded = Environment.ExpandEnvironmentVariables(line);
            if (!strExpanded.Equals(line))
            {
                ++nModifications;
            }
            file.WriteLine(strExpanded);
        }

        file.Close();
        fileOut.Close();
    }
Example #3
0
 private void _read()
 {
     _pattern = new Cstring(m_io, this, m_root);
     _options = new Cstring(m_io, this, m_root);
 }
Example #4
0
            private void _read()
            {
                _typeByte = ((BsonType)m_io.ReadU1());
                _name     = new Cstring(m_io, this, m_root);
                switch (TypeByte)
                {
                case BsonType.NumberDouble: {
                    _content = m_io.ReadF8le();
                    break;
                }

                case BsonType.CodeWithScope: {
                    _content = new CodeWithScope(m_io, this, m_root);
                    break;
                }

                case BsonType.ObjectId: {
                    _content = new ObjectId(m_io, this, m_root);
                    break;
                }

                case BsonType.String: {
                    _content = new String(m_io, this, m_root);
                    break;
                }

                case BsonType.RegEx: {
                    _content = new RegEx(m_io, this, m_root);
                    break;
                }

                case BsonType.NumberDecimal: {
                    _content = new F16(m_io, this, m_root);
                    break;
                }

                case BsonType.UtcDatetime: {
                    _content = m_io.ReadS8le();
                    break;
                }

                case BsonType.NumberLong: {
                    _content = m_io.ReadS8le();
                    break;
                }

                case BsonType.Timestamp: {
                    _content = new Timestamp(m_io, this, m_root);
                    break;
                }

                case BsonType.DbPointer: {
                    _content = new DbPointer(m_io, this, m_root);
                    break;
                }

                case BsonType.Array: {
                    _content = new Bson(m_io);
                    break;
                }

                case BsonType.Javascript: {
                    _content = new String(m_io, this, m_root);
                    break;
                }

                case BsonType.Boolean: {
                    _content = m_io.ReadU1();
                    break;
                }

                case BsonType.Document: {
                    _content = new Bson(m_io);
                    break;
                }

                case BsonType.Symbol: {
                    _content = new String(m_io, this, m_root);
                    break;
                }

                case BsonType.NumberInt: {
                    _content = m_io.ReadS4le();
                    break;
                }

                case BsonType.BinData: {
                    _content = new BinData(m_io, this, m_root);
                    break;
                }
                }
            }
Example #5
0
 private void _read()
 {
     _curveName = new Cstring(m_io, this, m_root);
     _ec        = new EllipticCurve(m_io, this, m_root);
 }