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


C# BinaryWriter.WriteSizedBuffer方法代码示例

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


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

示例1: Write

        public void Write(MvdDocument document, BinaryWriter bw)
        {
            bw.WriteSizedBuffer(document.Encoding.GetBytes(this.ObjectName));
            bw.WriteSizedBuffer(document.Encoding.GetBytes(this.EnglishObjectName));
            bw.Write(this.KeyFps);
            bw.WriteSizedBuffer(new byte[0]);

            foreach (var i in this.Sections)
                i.Write(document, bw);

            bw.Write((byte)MvdTag.Eof);
            bw.Write((byte)0);
        }
开发者ID:mfakane,项目名称:Keystone,代码行数:13,代码来源:MvdObject.cs

示例2: Write

        public void Write(BinaryWriter bw, PmxDocument doc)
        {
            bw.WriteSizedBuffer(doc.Header.Encoding.GetBytes(this.Name));
            bw.WriteSizedBuffer(doc.Header.Encoding.GetBytes(this.EnglishName));
            this.Diffuse.ForEach(bw.Write);
            this.Specular.ForEach(bw.Write);
            bw.Write(this.Power);
            this.Ambient.ForEach(bw.Write);
            bw.Write((byte)this.Options);
            this.EdgeColor.ForEach(bw.Write);
            bw.Write(this.EdgeSize);
            doc.WriteIndex(bw, PmxIndexKind.Texture, this.MainTexture);
            doc.WriteIndex(bw, PmxIndexKind.Texture, this.SubTexture);
            bw.Write((byte)this.SubTextureMode);
            bw.Write(this.UseSharedToonTexture);

            if (this.UseSharedToonTexture)
                bw.Write((byte)this.ToonTexture);
            else
                doc.WriteIndex(bw, PmxIndexKind.Texture, this.ToonTexture);

            bw.WriteSizedBuffer(doc.Header.Encoding.GetBytes(this.Comment));
            bw.Write(this.IndexCount);
        }
开发者ID:ZeusAFK,项目名称:Keystone,代码行数:24,代码来源:PmxMaterial.cs

示例3: WriteString

 internal void WriteString(BinaryWriter bw, string value)
 {
     bw.WriteSizedBuffer(this.Header.Encoding.GetBytes(value));
 }
开发者ID:mfakane,项目名称:Keystone,代码行数:4,代码来源:PmxDocument.cs

示例4: Write

        public void Write(Stream stream)
        {
            // leave open
            var bw = new BinaryWriter(stream);
            var buf = new byte[30];

            Encoding.GetEncoding(932).GetBytes(DisplayName, 0, DisplayName.Length, buf, 0);
            bw.Write(buf);
            bw.Write(this.Version);
            bw.Write((byte)(this.Encoding.CodePage == Encoding.Unicode.CodePage ? 0 : 1));

            bw.WriteSizedBuffer(this.Encoding.GetBytes(this.ObjectName));
            bw.WriteSizedBuffer(this.Encoding.GetBytes(this.ObjectName));
            bw.Write(this.KeyFps);
            bw.WriteSizedBuffer(new byte[0]);

            foreach (var i in this.Sections)
                i.Write(this, bw);

            bw.Write((byte)MvdTag.Eof);
            bw.Write((byte)0);
        }
开发者ID:ZeusAFK,项目名称:Keystone,代码行数:22,代码来源:MvdDocument.cs

示例5: Write

        public virtual void Write(MvdDocument document, BinaryWriter bw)
        {
            bw.Write((byte)this.Tag);
            bw.Write(this.MinorType);
            bw.Write(this.RawKey);
            bw.Write(this.RawItemSize);
            bw.Write(this.RawCount);

            using (var ms = new MemoryStream())
            {
                using (var exw = new BinaryWriter(ms))
                    WriteExtensionRegion(document, exw);

                bw.WriteSizedBuffer(ms.ToArray());
            }
        }
开发者ID:mfakane,项目名称:Keystone,代码行数:16,代码来源:MvdSection.cs


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