Пример #1
0
		public override void Write(IWriteBuffer buffer, string str)
		{
			int length = str.Length;
			char[] chars = new char[length];
			Sharpen.Runtime.GetCharsForString(str, 0, length, chars, 0);
			for (int i = 0; i < length; i++)
			{
				buffer.WriteByte((byte)(chars[i] & unchecked((int)(0xff))));
				buffer.WriteByte((byte)(chars[i] >> 8));
			}
		}
Пример #2
0
 public override void Write(IWriteBuffer buffer, string str)
 {
     var length = str.Length;
     var chars = new char[length];
     Runtime.GetCharsForString(str, 0, length, chars, 0);
     for (var i = 0; i < length; i++)
     {
         buffer.WriteByte((byte) (chars[i] & unchecked(0xff)));
         buffer.WriteByte((byte) (chars[i] >> 8));
     }
 }
Пример #3
0
        public override void Write(IWriteBuffer buffer, string str)
        {
            var length = str.Length;
            var chars  = new char[length];

            Runtime.GetCharsForString(str, 0, length, chars, 0);
            for (var i = 0; i < length; i++)
            {
                buffer.WriteByte((byte)(chars[i] & unchecked (0xff)));
                buffer.WriteByte((byte)(chars[i] >> 8));
            }
        }
Пример #4
0
        public override void Write(IWriteBuffer buffer, string str)
        {
            int length = str.Length;

            char[] chars = new char[length];
            Sharpen.Runtime.GetCharsForString(str, 0, length, chars, 0);
            for (int i = 0; i < length; i++)
            {
                buffer.WriteByte((byte)(chars[i] & unchecked ((int)(0xff))));
                buffer.WriteByte((byte)(chars[i] >> 8));
            }
        }
Пример #5
0
 public static void WriteEnd(IWriteBuffer buffer)
 {
     if (Deploy.debug && Deploy.brackets)
     {
         if (buffer is MarshallingContext)
         {
             ((MarshallingContext)buffer).DebugWriteEnd(Const4.Yapend);
             return;
         }
         buffer.WriteByte(Const4.Yapend);
     }
 }
Пример #6
0
 public static void WriteLong(IWriteBuffer buffer, long val)
 {
     if (Deploy.debug && Deploy.debugLong)
     {
         var l_s = "                                " + val;
         new LatinStringIO().Write(buffer, Runtime.Substring(l_s, l_s.Length - Const4
                                                             .LongBytes));
     }
     for (var i = 0; i < Const4.LongBytes; i++)
     {
         buffer.WriteByte((byte)(val >> ((Const4.LongBytes - 1 - i) * 8)));
     }
 }
Пример #7
0
 public static void WriteLong(IWriteBuffer buffer, long val)
 {
     if (Deploy.debug && Deploy.debugLong)
     {
         var l_s = "                                " + val;
         new LatinStringIO().Write(buffer, Runtime.Substring(l_s, l_s.Length - Const4
             .LongBytes));
     }
     for (var i = 0; i < Const4.LongBytes; i++)
     {
         buffer.WriteByte((byte) (val >> ((Const4.LongBytes - 1 - i)*8)));
     }
 }
Пример #8
0
 public static void WriteEnd(IWriteBuffer buffer)
 {
     if (Deploy.debug && Deploy.brackets)
     {
         if (buffer is MarshallingContext)
         {
             ((MarshallingContext) buffer).DebugWriteEnd(Const4.Yapend);
             return;
         }
         buffer.WriteByte(Const4.Yapend);
     }
 }