Exemplo n.º 1
0
Arquivo: Server.cs Projeto: ifzz/FDK
		private static void LrpInvoke_Simple_Constructor(int offset, MemoryBuffer buffer, Channel channel)
		{
			var component = channel.Simple;
			buffer.Reset(offset);
			var result = component.Constructor();
			buffer.WriteLocalPointer(result);
		}
Exemplo n.º 2
0
Arquivo: Server.cs Projeto: ifzz/FDK
		private static void LrpInvoke_Simple_Inverse(int offset, MemoryBuffer buffer, Channel channel)
		{
			var component = channel.Simple;
			var arg0 = buffer.ReadAString();
			buffer.Reset(offset);
			var result = component.Inverse(arg0);
			buffer.WriteAString(result);
		}
Exemplo n.º 3
0
Arquivo: Server.cs Projeto: ifzz/FDK
		private static int LrpInvoke_Simple(int offset, int methodId, MemoryBuffer buffer, Channel channel)
		{
			if((methodId < 0) || (methodId >= 3))
			{
				return MagicNumbers.LRP_INVALID_METHOD_ID;
			}
			gSimpleHandlers[methodId](offset, buffer, channel);
			return MagicNumbers.S_OK;
		}
Exemplo n.º 4
0
Arquivo: Server.cs Projeto: ifzz/FDK
		private static void LrpInvoke_Simple_Factorial(int offset, MemoryBuffer buffer, Channel channel)
		{
			var component = channel.Simple;
			var arg0 = buffer.ReadInt32();
			var arg1 = default(int);
			buffer.Reset(offset);
			var result = component.Factorial(arg0, out arg1);
			buffer.WriteInt32(arg1);
			buffer.WriteBoolean(result);
		}
Exemplo n.º 5
0
Arquivo: Server.cs Projeto: ifzz/FDK
		private static void LrpInvoke_Extended_Do(int offset, MemoryBuffer buffer, Channel channel)
		{
			var component = channel.Extended;
			var arg0 = buffer.ReadInType();
			var arg1 = buffer.ReadInOutType();
			var arg2 = default(LocalCSharp.OutType);
			buffer.Reset(offset);
			var result = component.Do(arg0, ref arg1, out arg2);
			buffer.WriteInOutType(arg1);
			buffer.WriteOutType(arg2);
			buffer.WriteReturnType(result);
		}
Exemplo n.º 6
0
Arquivo: Server.cs Projeto: ifzz/FDK
		private static void LrpInvoke_Extended_MarketBuy(int offset, MemoryBuffer buffer, Channel channel)
		{
			var component = channel.Extended;
			var arg0 = buffer.ReadAString();
			var arg1 = buffer.ReadDouble();
			var arg2 = buffer.ReadDouble();
			var arg3 = default(double);
			buffer.Reset(offset);
			var result = component.MarketBuy(arg0, arg1, ref arg2, out arg3);
			buffer.WriteDouble(arg2);
			buffer.WriteDouble(arg3);
			buffer.WriteInt32(result);
		}
Exemplo n.º 7
0
Arquivo: Server.cs Projeto: ifzz/FDK
		private static int LrpInvokeEx(int offset, int componentId, int methodId, MemoryBuffer buffer, Channel channel)
		{
			if((componentId < 0) || (componentId >= 2))
			{
				return MagicNumbers.LRP_INVALID_COMPONENT_ID;
			}
			int result = MagicNumbers.LRP_EXCEPTION;
			try
			{
				try
				{
					result = gHandlers[componentId](offset, methodId, buffer, channel);
					return result;
				}
				catch(System.Exception e)
				{
					buffer.Reset(offset);
					buffer.WriteInt32(-1);
					buffer.WriteAString(e.Message);
				}
			}
			catch(System.Exception)
			{
				result = MagicNumbers.E_FAIL;
			}
			return result;
		}