Exemplo n.º 1
0
Arquivo: Extended.cs Projeto: ifzz/FDK
		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;
			}
		}
Exemplo n.º 2
0
		public static void WriteQuoteEntryArray(this MemoryBuffer buffer, LocalCSharp.QuoteEntry[] arg)
		{
			buffer.WriteInt32(arg.Length);
			foreach(var element in arg)
			{
				buffer.WriteQuoteEntry(element);
			}
		}
Exemplo n.º 3
0
		public static void WriteQuoteEntry(this MemoryBuffer buffer, LocalCSharp.QuoteEntry arg)
		{
			buffer.WriteDouble(arg.Price);
			buffer.WriteDouble(arg.Volume);
		}
Exemplo n.º 4
0
		public static void WriteReturnType(this MemoryBuffer buffer, LocalCSharp.ReturnType arg)
		{
			buffer.WriteUsedType(arg.Used);
			buffer.WriteDouble(arg.Value4);
		}
Exemplo n.º 5
0
		public static void WriteOutType(this MemoryBuffer buffer, LocalCSharp.OutType arg)
		{
			buffer.WriteUsedType(arg.Used);
			buffer.WriteDouble(arg.Value3);
		}
Exemplo n.º 6
0
		public static void WriteUsedType(this MemoryBuffer buffer, LocalCSharp.UsedType arg)
		{
			buffer.WriteInt32(arg.Code);
			buffer.WriteAString(arg.Description);
		}
Exemplo n.º 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);
		}