当前位置: 首页>>代码示例>>C#>>正文


C# LittleEndianOutput.Write方法代码示例

本文整理汇总了C#中LittleEndianOutput.Write方法的典型用法代码示例。如果您正苦于以下问题:C# LittleEndianOutput.Write方法的具体用法?C# LittleEndianOutput.Write怎么用?C# LittleEndianOutput.Write使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在LittleEndianOutput的用法示例。


在下文中一共展示了LittleEndianOutput.Write方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Serialize

 public override void Serialize(LittleEndianOutput out1)
 {
     out1.WriteShort(rt);
     out1.WriteShort(grbitFrt);
     out1.WriteShort(iObjectKind);
     // 6 bytes unused
     out1.Write(unused);
 }
开发者ID:Henry-T,项目名称:UnityPG,代码行数:8,代码来源:ChartEndBlockRecord.cs

示例2: Serialize

        public override void Serialize(LittleEndianOutput out1)
        {
            out1.WriteShort(rt);
            out1.WriteShort(grbitFrt);
            out1.Write(unused);
            out1.WriteInt(cts);

            out1.WriteShort(rgchDefListStyle.Length);
            out1.WriteShort(rgchDefPivotStyle.Length);

            StringUtil.PutUnicodeLE(rgchDefListStyle, out1);
            StringUtil.PutUnicodeLE(rgchDefPivotStyle, out1);
        }
开发者ID:uwitec,项目名称:web-mvc-logistics,代码行数:13,代码来源:TableStylesRecord.cs

示例3: Write

    public override void Write(LittleEndianOutput out1)
    {
   		out1.WriteByte(sid + PtgClass);
 		out1.Write(field_1_reserved);
    }
开发者ID:uwitec,项目名称:web-mvc-logistics,代码行数:5,代码来源:ArrayPtg.cs

示例4: Serialize

        public override void Serialize(LittleEndianOutput out1)
        {
            String username = Username;
            bool is16bit = StringUtil.HasMultibyte(username);

            out1.WriteShort(username.Length);
            out1.WriteByte(is16bit ? 0x01 : 0x00);
            if (is16bit)
            {
                StringUtil.PutUnicodeLE(username, out1);
            }
            else
            {
                StringUtil.PutCompressedUnicode(username, out1);
            }
            int encodedByteCount = 3 + username.Length * (is16bit ? 2 : 1);
            int paddingSize = DATA_SIZE - encodedByteCount;
            out1.Write(PADDING, 0, paddingSize);
        }
开发者ID:uwitec,项目名称:web-mvc-logistics,代码行数:19,代码来源:WriteAccessRecord.cs

示例5: Serialize

 /**
  * spit the record out AS IS. no interpretation or identification
  */
 public override void Serialize(LittleEndianOutput out1)
 {
     out1.Write(_rawData);
 }
开发者ID:babywzazy,项目名称:Server,代码行数:7,代码来源:HeaderFooterRecord.cs

示例6: Serialize

 public override void Serialize(LittleEndianOutput out1)
 {
     out1.WriteShort(rt);
     out1.WriteShort(grbitFrt);
     out1.Write(unused);
 }
开发者ID:babywzazy,项目名称:Server,代码行数:6,代码来源:DataLabelExtensionRecord.cs

示例7: Serialize

 //public void Serialize(byte[] data, int offset)
 //{
 //    System.Array.Copy(_variableData, 0, data, offset, VARIABLE_DATA_LENGTH);
 //    LittleEndian.PutUShort(data, offset + VARIABLE_DATA_LENGTH, 0xFFFF);
 //}
 public void Serialize(LittleEndianOutput out1)
 {
     out1.Write(_variableData);
     out1.WriteShort(0xFFFF);
 }
开发者ID:babywzazy,项目名称:Server,代码行数:10,代码来源:FormulaRecord.cs

示例8: WriteTail

 private static void WriteTail(byte[] tail, LittleEndianOutput out1)
 {
     out1.Write(tail);
 }
开发者ID:babywzazy,项目名称:Server,代码行数:4,代码来源:HyperlinkRecord.cs

示例9: Serialize

 public override void Serialize(LittleEndianOutput out1)
 {
     out1.WriteShort(_sid);
      out1.WriteShort(_data.Length);
      out1.Write(_data);
 }
开发者ID:babywzazy,项目名称:Server,代码行数:6,代码来源:SubRecord.cs

示例10: PutCompressedUnicode

 public static void PutCompressedUnicode(String input, LittleEndianOutput out1)
 {
     byte[] bytes;
     try
     {
         bytes = Encoding.GetEncoding(ENCODING).GetBytes(input);
     }
     catch (EncoderFallbackException e)
     {
         throw;
     }
     out1.Write(bytes);
 }
开发者ID:uwitec,项目名称:web-mvc-logistics,代码行数:13,代码来源:StringUtil.cs

示例11: Serialize

 /**
  * Writes  The formula encoding is includes:
  * <ul>
  * <li>ushort tokenDataLen</li>
  * <li>tokenData</li>
  * <li>arrayConstantData (if present)</li>
  * </ul>
  */
 public void Serialize(LittleEndianOutput out1)
 {
     out1.WriteShort(_encodedTokenLen);
     out1.Write(_byteEncoding);
 }
开发者ID:uwitec,项目名称:web-mvc-logistics,代码行数:13,代码来源:Formula.cs

示例12: SerializeArrayConstantData

 public void SerializeArrayConstantData(LittleEndianOutput out1)
 {
     int len = _byteEncoding.Length - _encodedTokenLen;
     out1.Write(_byteEncoding, _encodedTokenLen, len);
 }
开发者ID:uwitec,项目名称:web-mvc-logistics,代码行数:5,代码来源:Formula.cs

示例13: SerializeTokens

 public void SerializeTokens(LittleEndianOutput out1)
 {
     out1.Write(_byteEncoding, 0, _encodedTokenLen);
 }
开发者ID:uwitec,项目名称:web-mvc-logistics,代码行数:4,代码来源:Formula.cs

示例14: Serialize

 /**
  * Serialize the record data into the supplied array of bytes
  *
  * @param offset offset in the <c>data</c>
  * @param data the data to Serialize into
  *
  * @return size of the record
  */
 public override void Serialize(LittleEndianOutput out1)
 {
     out1.WriteShort(sid);
     out1.WriteShort(reserved.Length);
     out1.Write(reserved);
 }
开发者ID:uwitec,项目名称:web-mvc-logistics,代码行数:14,代码来源:NoteStructureSubRecord.cs

示例15: Serialize

        public override void Serialize(LittleEndianOutput out1)
        {
            int formulaSize = field_2_refPtg == null ? field_2_unknownFormulaData.Length : field_2_refPtg.Size;
            int idOffset = GetStreamIDOffset(formulaSize);
            int dataSize = GetDataSize(idOffset);


		    out1.WriteShort(sid);
		    out1.WriteShort(dataSize);

		    out1.WriteShort(idOffset);
		    out1.WriteShort(formulaSize);
		    out1.WriteInt(field_1_unknown_int);

            int pos = 12;

            if (field_2_refPtg == null)
            {
                out1.Write(field_2_unknownFormulaData);
            }
            else
            {
                field_2_refPtg.Write(out1);
            }
            pos += formulaSize;

            int stringLen;
            if (field_4_ole_classname == null)
            {
                // don't write 0x03, stringLen, flag, text
                stringLen = 0;
            }
            else
            {
                out1.WriteByte(0x03);
                pos += 1;
                stringLen = field_4_ole_classname.Length;
                out1.WriteShort(stringLen);
                pos += 2;
                if (stringLen > 0)
                {
                    out1.WriteByte(field_3_unicode_flag ? 0x01 : 0x00);
                    pos += 1;

                    if (field_3_unicode_flag)
                    {
                        StringUtil.PutUnicodeLE(field_4_ole_classname, out1);
                        pos += stringLen * 2;
                    }
                    else
                    {
                        StringUtil.PutCompressedUnicode(field_4_ole_classname, out1);
                        pos += stringLen;
                    }
                }
            }

            // pad to next 2-byte boundary (requires 0 or 1 bytes)
            switch (idOffset - (pos - 6 ))
            { // 6 for 3 shorts: sid, dataSize, idOffset
                case 1:
                    out1.WriteByte(field_4_unknownByte == null ? 0x00 : Convert.ToByte(field_4_unknownByte));
                    pos++;
                    break;
                case 0:
                    break;
                default:
                    throw new InvalidOperationException("Bad padding calculation (" + idOffset + ", " + pos + ")");
            }

            if (field_5_stream_id != null)
            {
                out1.WriteInt(Convert.ToInt32(field_5_stream_id));
                pos += 4;
            }
            out1.Write(field_6_unknown);
        }
开发者ID:Henry-T,项目名称:UnityPG,代码行数:77,代码来源:EmbeddedObjectRefSubRecord.cs


注:本文中的LittleEndianOutput.Write方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。