WriteString() private method

private WriteString ( String value ) : void
value String
return void
Ejemplo n.º 1
0
        internal static void WriteTypeInfo(BinaryTypeEnum binaryTypeEnum, object typeInformation, int assemId, __BinaryWriter sout)
        {
            switch (binaryTypeEnum)
            {
            case BinaryTypeEnum.Primitive:
            case BinaryTypeEnum.PrimitiveArray:
                sout.WriteByte((byte)(InternalPrimitiveTypeE)typeInformation);
                break;

            case BinaryTypeEnum.String:
                break;

            case BinaryTypeEnum.Object:
                break;

            case BinaryTypeEnum.ObjectUrt:
                sout.WriteString(typeInformation.ToString());
                break;

            case BinaryTypeEnum.ObjectUser:
                sout.WriteString(typeInformation.ToString());
                sout.WriteInt32(assemId);
                break;

            case BinaryTypeEnum.ObjectArray:
                break;

            case BinaryTypeEnum.StringArray:
                break;

            default:
                throw new SerializationException(Environment.GetResourceString("Serialization_TypeWrite", (object)binaryTypeEnum.ToString()));
            }
        }
 public void Write(__BinaryWriter sout)
 {
     sout.WriteByte((byte) this.binaryHeaderEnum);
     sout.WriteInt32(this.objectId);
     sout.WriteString(this.name);
     sout.WriteInt32(this.numMembers);
     for (int i = 0; i < this.numMembers; i++)
     {
         sout.WriteString(this.memberNames[i]);
     }
     if (this.assemId > 0)
     {
         sout.WriteInt32(this.assemId);
     }
 }
 public void Write(__BinaryWriter sout)
 {
     sout.WriteByte((byte)this.binaryHeaderEnum);
     sout.WriteInt32(this.objectId);
     sout.WriteString(this.name);
     sout.WriteInt32(this.numMembers);
     for (int i = 0; i < this.numMembers; i++)
     {
         sout.WriteString(this.memberNames[i]);
     }
     if (this.assemId > 0)
     {
         sout.WriteInt32(this.assemId);
     }
 }
Ejemplo n.º 4
0
 public void Write(__BinaryWriter sout)
 {
     sout.WriteByte((byte)this.binaryHeaderEnum);
     sout.WriteInt32(this.objectId);
     sout.WriteString(this.name);
     sout.WriteInt32(this.numMembers);
     for (int index = 0; index < this.numMembers; ++index)
     {
         sout.WriteString(this.memberNames[index]);
     }
     if (this.assemId <= 0)
     {
         return;
     }
     sout.WriteInt32(this.assemId);
 }
Ejemplo n.º 5
0
 // Token: 0x0600529B RID: 21147 RVA: 0x0012227C File Offset: 0x0012047C
 internal static void WriteStringWithCode(string value, __BinaryWriter sout)
 {
     if (value == null)
     {
         sout.WriteByte(17);
         return;
     }
     sout.WriteByte(18);
     sout.WriteString(value);
 }
 internal static void WriteStringWithCode(string value, __BinaryWriter sout)
 {
     if (value == null)
     {
         sout.WriteByte(0x11);
     }
     else
     {
         sout.WriteByte(0x12);
         sout.WriteString(value);
     }
 }
Ejemplo n.º 7
0
 internal static void WriteStringWithCode(string value, __BinaryWriter sout)
 {
     if (value == null)
     {
         sout.WriteByte(0x11);
     }
     else
     {
         sout.WriteByte(0x12);
         sout.WriteString(value);
     }
 }
 // Token: 0x060052ED RID: 21229 RVA: 0x00123558 File Offset: 0x00121758
 public void Write(__BinaryWriter sout)
 {
     sout.WriteByte((byte)this.binaryHeaderEnum);
     sout.WriteInt32(this.objectId);
     sout.WriteString(this.name);
     sout.WriteInt32(this.numMembers);
     for (int i = 0; i < this.numMembers; i++)
     {
         sout.WriteString(this.memberNames[i]);
     }
     for (int j = 0; j < this.numMembers; j++)
     {
         sout.WriteByte((byte)this.binaryTypeEnumA[j]);
     }
     for (int k = 0; k < this.numMembers; k++)
     {
         BinaryConverter.WriteTypeInfo(this.binaryTypeEnumA[k], this.typeInformationA[k], this.memberAssemIds[k], sout);
     }
     if (this.assemId > 0)
     {
         sout.WriteInt32(this.assemId);
     }
 }
Ejemplo n.º 9
0
 public void Write(__BinaryWriter sout)
 {
     sout.WriteByte((byte)this.binaryHeaderEnum);
     sout.WriteInt32(this.objectId);
     sout.WriteString(this.name);
     sout.WriteInt32(this.numMembers);
     for (int index = 0; index < this.numMembers; ++index)
     {
         sout.WriteString(this.memberNames[index]);
     }
     for (int index = 0; index < this.numMembers; ++index)
     {
         sout.WriteByte((byte)this.binaryTypeEnumA[index]);
     }
     for (int index = 0; index < this.numMembers; ++index)
     {
         BinaryConverter.WriteTypeInfo(this.binaryTypeEnumA[index], this.typeInformationA[index], this.memberAssemIds[index], sout);
     }
     if (this.assemId <= 0)
     {
         return;
     }
     sout.WriteInt32(this.assemId);
 }
        internal static void WriteTypeInfo(BinaryTypeEnum binaryTypeEnum, object typeInformation, int assemId, __BinaryWriter sout)
        {
            switch (binaryTypeEnum)
            {
                case BinaryTypeEnum.Primitive:
                case BinaryTypeEnum.PrimitiveArray:
                    sout.WriteByte((byte) ((InternalPrimitiveTypeE) typeInformation));
                    return;

                case BinaryTypeEnum.String:
                case BinaryTypeEnum.Object:
                case BinaryTypeEnum.ObjectArray:
                case BinaryTypeEnum.StringArray:
                    return;

                case BinaryTypeEnum.ObjectUrt:
                    sout.WriteString(typeInformation.ToString());
                    return;

                case BinaryTypeEnum.ObjectUser:
                    sout.WriteString(typeInformation.ToString());
                    sout.WriteInt32(assemId);
                    return;
            }
            throw new SerializationException(Environment.GetResourceString("Serialization_TypeWrite", new object[] { binaryTypeEnum.ToString() }));
        }
 public void Write(__BinaryWriter sout)
 {
     sout.WriteByte(12);
     sout.WriteInt32(this.assemId);
     sout.WriteString(this.assemblyString);
 }
 public void Write(__BinaryWriter sout) 
 {
     sout.WriteByte((Byte)BinaryHeaderEnum.Assembly);
     sout.WriteInt32(assemId);
     sout.WriteString(assemblyString); 
 }
        public  void Write(__BinaryWriter sout)
        { 
            sout.WriteByte((Byte)binaryHeaderEnum);
            sout.WriteInt32(objectId); 
            sout.WriteString(name); 
            sout.WriteInt32(numMembers);
            for (int i=0; i<numMembers; i++) 
                sout.WriteString(memberNames[i]);
            for (int i=0; i<numMembers; i++)
                sout.WriteByte((Byte)binaryTypeEnumA[i]);
            for (int i=0; i<numMembers; i++) 
                //if (binaryTypeEnumA[i] != BinaryTypeEnum.ObjectUrt && binaryTypeEnumA[i] != BinaryTypeEnum.ObjectUser)
                    BinaryConverter.WriteTypeInfo(binaryTypeEnumA[i], typeInformationA[i], memberAssemIds[i], sout); 
 
            if (assemId > 0)
                sout.WriteInt32(assemId); 

        }
        public  void Write(__BinaryWriter sout)
        {

            sout.WriteByte((Byte)binaryHeaderEnum); 
            sout.WriteInt32(objectId);
            sout.WriteString(name); 
            sout.WriteInt32(numMembers); 
            for (int i=0; i<numMembers; i++)
                sout.WriteString(memberNames[i]); 
            if (assemId > 0)
                sout.WriteInt32(assemId);
        }
 public  void Write(__BinaryWriter sout) 
 {
     sout.WriteByte((Byte)BinaryHeaderEnum.ObjectString); 
     sout.WriteInt32(objectId);
     sout.WriteString(value);
 }
 internal static void WriteStringWithCode(String value, __BinaryWriter sout)
 { 
     if (value == null)
         sout.WriteByte((Byte)InternalPrimitiveTypeE.Null);
     else
     { 
         sout.WriteByte((Byte)InternalPrimitiveTypeE.String);
         sout.WriteString(value); 
     } 
 }
 public void Write(__BinaryWriter sout)
 {
     sout.WriteByte((byte) this.binaryHeaderEnum);
     sout.WriteInt32(this.objectId);
     sout.WriteString(this.name);
     sout.WriteInt32(this.numMembers);
     for (int i = 0; i < this.numMembers; i++)
     {
         sout.WriteString(this.memberNames[i]);
     }
     for (int j = 0; j < this.numMembers; j++)
     {
         sout.WriteByte((byte) this.binaryTypeEnumA[j]);
     }
     for (int k = 0; k < this.numMembers; k++)
     {
         BinaryConverter.WriteTypeInfo(this.binaryTypeEnumA[k], this.typeInformationA[k], this.memberAssemIds[k], sout);
     }
     if (this.assemId > 0)
     {
         sout.WriteInt32(this.assemId);
     }
 }
 // Token: 0x060052CF RID: 21199 RVA: 0x0012321E File Offset: 0x0012141E
 public void Write(__BinaryWriter sout)
 {
     sout.WriteByte(6);
     sout.WriteInt32(this.objectId);
     sout.WriteString(this.value);
 }
 public void Write(__BinaryWriter sout)
 {
     sout.WriteByte(6);
     sout.WriteInt32(this.objectId);
     sout.WriteString(this.value);
 }
Ejemplo n.º 20
0
 public void Write(__BinaryWriter sout)
 {
     sout.WriteByte((byte)12);
     sout.WriteInt32(this.assemId);
     sout.WriteString(this.assemblyString);
 }
        // Writes the type information on the wire 
        internal static void WriteTypeInfo(BinaryTypeEnum binaryTypeEnum, Object typeInformation, int assemId, __BinaryWriter sout)
        {
            SerTrace.Log( "BinaryConverter", "WriteTypeInfo Entry  ",((Enum)binaryTypeEnum).ToString()," ",typeInformation," assemId ",assemId);
 
            switch (binaryTypeEnum)
            { 
                case BinaryTypeEnum.Primitive: 
                case BinaryTypeEnum.PrimitiveArray:
                    Contract.Assert(typeInformation!=null, "[BinaryConverter.WriteTypeInfo]typeInformation!=null"); 
                    sout.WriteByte((Byte)((InternalPrimitiveTypeE)typeInformation));
                    break;
                case BinaryTypeEnum.String:
                case BinaryTypeEnum.Object: 
                case BinaryTypeEnum.StringArray:
                case BinaryTypeEnum.ObjectArray: 
                    break; 
                case BinaryTypeEnum.ObjectUrt:
                    Contract.Assert(typeInformation!=null, "[BinaryConverter.WriteTypeInfo]typeInformation!=null"); 
                    sout.WriteString(typeInformation.ToString());
                    break;
                case BinaryTypeEnum.ObjectUser:
                    Contract.Assert(typeInformation!=null, "[BinaryConverter.WriteTypeInfo]typeInformation!=null"); 
                    sout.WriteString(typeInformation.ToString());
                    sout.WriteInt32(assemId); 
                    break; 
                default:
                    throw new SerializationException(Environment.GetResourceString("Serialization_TypeWrite",((Enum)binaryTypeEnum).ToString())); 
            }
            SerTrace.Log( "BinaryConverter", "WriteTypeInfo Exit");
        }