Beispiel #1
0
		public LocalCSharp.ReturnType Do(LocalCSharp.InType inArg, ref LocalCSharp.InOutType inOutArg, out LocalCSharp.OutType outArg)
		{
			using(MemoryBuffer buffer = m_client.Create())
			{
				buffer.WriteInType(inArg);
				buffer.WriteInOutType(inOutArg);

				int _status = m_client.Invoke(1, 0, buffer);
				TypesSerializer.Throw(_status, buffer);

				inOutArg = buffer.ReadInOutType();
				outArg = buffer.ReadOutType();
				var _result = buffer.ReadReturnType();
				return _result;
			}
		}
Beispiel #2
0
		public static void WriteQuoteEntryArray(this MemoryBuffer buffer, LocalCSharp.QuoteEntry[] arg)
		{
			buffer.WriteInt32(arg.Length);
			foreach(var element in arg)
			{
				buffer.WriteQuoteEntry(element);
			}
		}
Beispiel #3
0
		public static void WriteQuoteEntry(this MemoryBuffer buffer, LocalCSharp.QuoteEntry arg)
		{
			buffer.WriteDouble(arg.Price);
			buffer.WriteDouble(arg.Volume);
		}
Beispiel #4
0
		public static void WriteReturnType(this MemoryBuffer buffer, LocalCSharp.ReturnType arg)
		{
			buffer.WriteUsedType(arg.Used);
			buffer.WriteDouble(arg.Value4);
		}
Beispiel #5
0
		public static void WriteOutType(this MemoryBuffer buffer, LocalCSharp.OutType arg)
		{
			buffer.WriteUsedType(arg.Used);
			buffer.WriteDouble(arg.Value3);
		}
Beispiel #6
0
		public static void WriteUsedType(this MemoryBuffer buffer, LocalCSharp.UsedType arg)
		{
			buffer.WriteInt32(arg.Code);
			buffer.WriteAString(arg.Description);
		}
Beispiel #7
0
		public static void WriteLevel2(this MemoryBuffer buffer, LocalCSharp.Level2 arg)
		{
			buffer.WriteTime(arg.CreatingTime);
			buffer.WriteQuoteEntryArray(arg.Bids);
			buffer.WriteQuoteEntryArray(arg.Asks);
			buffer.WriteAString(arg.Symbol);
		}