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


C# IOutputStream.Write方法代码示例

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


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

示例1: WriteTo

   public override void WriteTo(
 IOutputStream stream,
 Document context
 )
   {
       stream.Write(BeginChunk);
         base.WriteTo(stream, context);
         stream.Write(EndChunk);
   }
开发者ID:josuecorrea,项目名称:DanfeSharp,代码行数:9,代码来源:Text.cs

示例2: WriteTo

 public override void WriteTo(
     IOutputStream stream,
     Document context
     )
 {
     stream.Write(value);
 }
开发者ID:n9,项目名称:pdfclown,代码行数:7,代码来源:InlineImageBody.cs

示例3: WriteTo

   public override void WriteTo(
 IOutputStream stream,
 Document context
 )
   {
       if(operands != null)
         {
       files.File fileContext = context.File;
       foreach(PdfDirectObject operand in operands)
       {operand.WriteTo(stream, fileContext); stream.Write(Chunk.Space);}
         }
         stream.Write(operator_); stream.Write(Chunk.LineFeed);
   }
开发者ID:jujubeast,项目名称:PDFEditor,代码行数:13,代码来源:Operation.cs

示例4: DisplayCoreDump

        private void DisplayCoreDump(ExecutionMirror executionMirror, IOutputStream outputStream)
        {
            if (null == executionMirror)
                return; // This can be "null" if there's compilation errors.

            ITextEditorSettings editorSettings = TextEditorCore.Instance.TextEditorSettings;
            if (false == editorSettings.DisplayOutput)
                return; // The output display has been disabled, don't display.

            try
            {
                List<string> variableList = null;
                executionMirror.GetCoreDump(out variableList,
                    editorSettings.MaxArrayDisplaySize,
                    editorSettings.MaxOutputDepth);

                if (null != variableList)
                {
                    foreach (string variable in variableList)
                    {
                        outputStream.Write(new ProtoCore.OutputMessage(
                            OutputMessage.MessageType.Info, variable));

                        Logger.LogPerf("CoreDump-ExecSession", variable);
                    }
                }
            }
            catch (System.Exception ex)
            {
                outputStream.Write(new ProtoCore.OutputMessage(OutputMessage.MessageType.Error, ex.Message));
                Logger.LogPerf("CoreDumpEx", ex.Message);

            }
        }
开发者ID:seasailor,项目名称:designscript,代码行数:34,代码来源:VirtualMachineWorker.cs

示例5: WriteTo

 public override void WriteTo(
     IOutputStream stream,
     Document context
     )
 {
     stream.Write(BeginOperatorKeyword); stream.Write("\n");
       Header.WriteTo(stream, context);
       stream.Write(DataOperatorKeyword); stream.Write("\n");
       Body.WriteTo(stream, context); stream.Write("\n");
       stream.Write(EndOperatorKeyword);
 }
开发者ID:n9,项目名称:pdfclown,代码行数:11,代码来源:InlineImage.cs

示例6: WriteTo

   public override void WriteTo(
 IOutputStream stream,
 File context
 )
   {
       // Header.
         stream.Write(reference.Id); stream.Write(BeginIndirectObjectChunk);
         // Body.
         DataObject.WriteTo(stream, context);
         // Tail.
         stream.Write(EndIndirectObjectChunk);
   }
开发者ID:josuecorrea,项目名称:DanfeSharp,代码行数:12,代码来源:PdfIndirectObject.cs

示例7: WriteTo

        public override void WriteTo(
      IOutputStream stream,
      File context
      )
        {
            header.Updateable = false;

              bool unencodedBody;
              byte[] bodyData;
              int bodyLength;

              // 1. Header.
              // Encoding.
              PdfDirectObject filterObject = header[PdfName.Filter];
              if(filterObject == null) // Unencoded body.
              {
            /*
              NOTE: Header entries related to stream body encoding are temporary, instrumental to the
              current serialization process only.
            */
            unencodedBody = true;

            // Set the filter to apply!
            filterObject = PdfName.FlateDecode; // zlib/deflate filter.
            // Get encoded body data applying the filter to the stream!
            bodyData = body.Encode(Filter.Get((PdfName)filterObject), null);
            // Set encoded length!
            bodyLength = bodyData.Length;
            // Update 'Filter' entry!
            header[PdfName.Filter] = filterObject;
              }
              else // Encoded body.
              {
            unencodedBody = false;

            // Get encoded body data!
            bodyData = body.ToByteArray();
            // Set encoded length!
            bodyLength = (int)body.Length;
              }
              // Set encoded length!
              header[PdfName.Length] = new PdfInteger(bodyLength);

              header.WriteTo(stream, context);

              // Is the body free from encodings?
              if(unencodedBody)
              {
            // Restore actual header entries!
            header[PdfName.Length] = new PdfInteger((int)body.Length);
            header[PdfName.Filter] = null;
              }

              // 2. Body.
              stream.Write(BeginStreamBodyChunk);
              stream.Write(bodyData);
              stream.Write(EndStreamBodyChunk);

              header.Updateable = true;
        }
开发者ID:jujubeast,项目名称:PDFEditor,代码行数:60,代码来源:PdfStream.cs

示例8: WriteTo

        public override void WriteTo(
            IOutputStream stream,
            File context
            )
        {
            /*
            NOTE: The header is temporarily tweaked to accommodate serialization settings.
              */
              header.Updateable = false;

              byte[] bodyData;
              {
            bool bodyUnencoded;
            {
              FileSpecification dataFile = DataFile;
              /*
            NOTE: In case of external file, the body buffer has to be saved back only if the file was
            actually resolved (that is brought into the body buffer) and modified.
              */
              bool encodeBody = (dataFile == null || (bodyResolved && body.Dirty));
              if(encodeBody)
              {
            PdfDirectObject filterObject = Filter;
            if(filterObject == null && context.Configuration.StreamFilterEnabled) // Unencoded body.
            {
              /*
                NOTE: Header entries related to stream body encoding are temporary, instrumental to
                the current serialization process only.
              */
              bodyUnencoded = true;

              // Set the filter to apply!
              filterObject = PdfName.FlateDecode; // zlib/deflate filter.
              // Get encoded body data applying the filter to the stream!
              bodyData = body.Encode(bytes.filters.Filter.Get((PdfName)filterObject), null);
              // Set 'Filter' entry!
              Filter = filterObject;
            }
            else // Encoded body.
            {
              bodyUnencoded = false;

              // Get encoded body data!
              bodyData = body.ToByteArray();
            }

            if(dataFile != null)
            {
              /*
                NOTE: In case of external file, body data has to be serialized there, leaving empty
                its representation within this stream.
              */
              try
              {
                IOutputStream dataFileOutputStream = dataFile.GetOutputStream();
                dataFileOutputStream.Write(bodyData);
                dataFileOutputStream.Dispose();
              }
              catch(Exception e)
              {throw new Exception("Data writing into " + dataFile.Path + " failed.", e);}
              // Local serialization is empty!
              bodyData = new byte[]{};
            }
              }
              else
              {
            bodyUnencoded = false;
            bodyData = new byte[]{};
              }
            }

            // Set the encoded data length!
            header[PdfName.Length] = PdfInteger.Get(bodyData.Length);

            // 1. Header.
            header.WriteTo(stream, context);

            if(bodyUnencoded)
            {
              // Restore actual header entries!
              header[PdfName.Length] = PdfInteger.Get((int)body.Length);
              Filter = null;
            }
              }

              // 2. Body.
              stream.Write(BeginStreamBodyChunk);
              stream.Write(bodyData);
              stream.Write(EndStreamBodyChunk);

              header.Updateable = true;
        }
开发者ID:n9,项目名称:pdfclown,代码行数:92,代码来源:PdfStream.cs

示例9: WriteTo

 public override void WriteTo(
     IOutputStream stream,
     File context
     )
 {
     stream.Write(IndirectReference);
 }
开发者ID:n9,项目名称:pdfclown,代码行数:7,代码来源:PdfReference.cs


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