Пример #1
0
 public void     Save(ISharedTable stringTable, BinaryWriter writer)
 {
     writer.WriteInt24(stringTable.RegisterString(this.name));
     writer.WriteInt24(stringTable.RegisterString(this.errorMessage));
     writer.WriteInt24(stringTable.RegisterString(this.declaringType));
     writer.WriteInt24(stringTable.RegisterString(this.type));
 }
Пример #2
0
 public void     Save(ISharedTable stringTable, BinaryWriter writer)
 {
     writer.WriteInt24(stringTable.RegisterString(this.name));
     writer.WriteInt24(stringTable.RegisterString(this.declaringType));
     writer.WriteInt24(stringTable.RegisterString(this.type));
     writer.Write((Byte)((this.hasAdd ? 1 : 0) | (this.hasRemove ? 2 : 0) | (this.errorMessage != null ? 4 : 0)));
     if (this.errorMessage != null)
     {
         writer.WriteInt24(stringTable.RegisterString(this.errorMessage));
     }
 }
Пример #3
0
        public void     Save(ISharedTable stringTable, BinaryWriter writer)
        {
            writer.WriteInt24(stringTable.RegisterString(this.name));
            writer.WriteInt24(stringTable.RegisterString(this.declaringType));
            writer.WriteInt24(stringTable.RegisterString(this.returnType));
            writer.Write((Byte)((this.isPublic ? 1 : 0) | (this.errorMessage != null ? 4 : 0)));
            writer.Write((UInt16)this.parametersType.Length);

            for (int i = 0, max = this.parametersType.Length; i < max; ++i)
            {
                writer.WriteInt24(stringTable.RegisterString(this.parametersType[i]));
                writer.WriteInt24(stringTable.RegisterString(this.parametersName[i]));
            }

            if (this.errorMessage != null)
            {
                writer.WriteInt24(stringTable.RegisterString(this.errorMessage));
            }
        }
Пример #4
0
        public void     Save(ISharedTable stringTable, BinaryWriter writer)
        {
            bool manyEvents     = this.events.Length > 256;
            bool manyFields     = this.fields.Length > 256;
            bool manyProperties = this.properties.Length > 256;
            bool manyMethods    = this.methods.Length > 256;

            writer.WriteInt24(stringTable.RegisterString(this.@namespace));
            writer.WriteInt24(stringTable.RegisterString(this.name));

            byte b = (Byte)((this.IsPublic ? 1 : 0) |
                            (this.ErrorMessage != null ? 4 : 0) |
                            (manyEvents == true ? 8 : 0) |
                            (manyFields == true ? 16 : 0) |
                            (manyProperties == true ? 32 : 0) |
                            (manyMethods == true ? 64 : 0));

            writer.Write(b);

            if (this.ErrorMessage != null)
            {
                writer.WriteInt24(stringTable.RegisterString(this.errorMessage));
            }

            if (manyEvents == true)
            {
                writer.Write((UInt16)this.events.Length);
            }
            else
            {
                writer.Write((Byte)this.events.Length);
            }

            for (int i = 0, max = this.events.Length; i < max; ++i)
            {
                writer.WriteInt24(stringTable.RegisterEvent(this.events[i]));
            }

            if (manyFields == true)
            {
                writer.Write((UInt16)this.fields.Length);
            }
            else
            {
                writer.Write((Byte)this.fields.Length);
            }

            for (int i = 0, max = this.fields.Length; i < max; ++i)
            {
                writer.WriteInt24(stringTable.RegisterField(this.fields[i]));
            }

            if (manyProperties == true)
            {
                writer.Write((UInt16)this.properties.Length);
            }
            else
            {
                writer.Write((Byte)this.properties.Length);
            }

            for (int i = 0, max = this.properties.Length; i < max; ++i)
            {
                writer.WriteInt24(stringTable.RegisterProperty(this.properties[i]));
            }

            if (manyMethods == true)
            {
                writer.Write((UInt16)this.methods.Length);
            }
            else
            {
                writer.Write((Byte)this.methods.Length);
            }

            for (int i = 0, max = this.methods.Length; i < max; ++i)
            {
                writer.WriteInt24(stringTable.RegisterMethod(this.methods[i]));
            }
        }