コード例 #1
0
        public virtual MultisourcedStream MakeStream(out long contentLength)
        {
            MultisourcedStream stream;

            Timestamp = DateTime.Now;
            Duration  = Timestamp - _start;
            CalculateJsonLength();
            System.IO.MemoryStream msKnot = new System.IO.MemoryStream(System.Text.Encoding.UTF8.GetBytes(JsonLength.ToString() + "\0"));
            System.IO.MemoryStream ms     = new System.IO.MemoryStream(System.Text.Encoding.UTF8.GetBytes(FullContent.ToString()));

            if (Stream != null)
            {
                stream = new MultisourcedStream(msKnot, ms, Stream);
            }
            else
            {
                stream = new MultisourcedStream(msKnot, ms);
            }

            contentLength = stream.Length;
            return(stream);
        }
コード例 #2
0
        public virtual MultisourcedStream MakeStream(out long contentLength)
        {
            MultisourcedStream stream;
            Timestamp = DateTime.Now;
            Duration = Timestamp - _start;
            CalculateJsonLength();
            System.IO.MemoryStream msKnot = new System.IO.MemoryStream(System.Text.Encoding.UTF8.GetBytes(JsonLength.ToString() + "\0"));
            System.IO.MemoryStream ms = new System.IO.MemoryStream(System.Text.Encoding.UTF8.GetBytes(FullContent.ToString()));

            if (Stream != null)
                stream = new MultisourcedStream(msKnot, ms, Stream);
            else
                stream = new MultisourcedStream(msKnot, ms);

            contentLength = stream.Length;
            return stream;
        }