Ejemplo n.º 1
0
 /// <summary>
 /// 异步回调返回值
 /// </summary>
 /// <param name="outputParameter">输出参数</param>
 public override void Callback(ref returnValue <outputParameterType> outputParameter)
 {
     try
     {
         callback(new returnValue {
             Type = outputParameter.Type
         });
     }
     catch (Exception error)
     {
         fastCSharp.log.Error.Add(error, null, false);
     }
 }
Ejemplo n.º 2
0
            /// <summary>
            /// 异步回调返回值
            /// </summary>
            /// <param name="outputParameter">输出参数</param>
            public override void Callback(ref returnValue <outputParameterType> outputParameter)
            {
                try
                {
#if NOJIT
                    callback(outputParameter.Type == returnValue.type.Success ? new returnValue <returnType> {
                        Type = returnValue.type.Success, Value = (returnType)outputParameter.Value.ReturnObject
                    } : new returnValue <returnType> {
                        Type = outputParameter.Type
                    });
#else
                    callback(outputParameter.Type == returnValue.type.Success ? new returnValue <returnType> {
                        Type = returnValue.type.Success, Value = (returnType)outputParameter.Value.Return
                    } : new returnValue <returnType> {
                        Type = outputParameter.Type
                    });
#endif
                }
                catch (Exception error)
                {
                    fastCSharp.log.Error.Add(error, null, false);
                }
            }