public Task <Xtruct> testMultiExceptionAsync(string arg0, string arg1, CancellationToken cancellationToken) { logger.Invoke("testMultiException({0}, {1})", arg0, arg1); if (arg0 == "Xception") { var x = new Xception { ErrorCode = 1001, Message = "This is an Xception" }; throw x; } if (arg0 == "Xception2") { var x = new Xception2 { ErrorCode = 2002, Struct_thing = new Xtruct { String_thing = "This is an Xception2" } }; throw x; } var result = new Xtruct { String_thing = arg1 }; return(Task.FromResult(result)); }
public Xtruct testMultiException(string arg0, string arg1) { Console.WriteLine("testMultiException(" + arg0 + ", " + arg1 + ")"); if (arg0 == "Xception") { Xception x = new Xception(); x.ErrorCode = 1001; x.Message = "This is an Xception"; throw x; } else if (arg0 == "Xception2") { Xception2 x = new Xception2(); x.ErrorCode = 2002; x.Struct_thing = new Xtruct(); x.Struct_thing.String_thing = "This is an Xception2"; throw x; } Xtruct result = new Xtruct(); result.String_thing = arg1; return(result); }
public Xtruct testMultiException(string arg0, string arg1) { testLogDelegate.Invoke("testMultiException({0}, {1})", arg0, arg1); if (arg0 == "Xception") { Xception x = new Xception(); x.ErrorCode = 1001; x.Message = "This is an Xception"; throw x; } else if (arg0 == "Xception2") { Xception2 x = new Xception2(); x.ErrorCode = 2002; x.Struct_thing = new Xtruct(); x.Struct_thing.String_thing = "This is an Xception2"; throw x; } Xtruct result = new Xtruct(); result.String_thing = arg1; return(result); }
public Xtruct testMultiException(string arg0, string arg1) { testLogDelegate.Invoke("testMultiException({0}, {1})", arg0,arg1); if (arg0 == "Xception") { Xception x = new Xception(); x.ErrorCode = 1001; x.Message = "This is an Xception"; throw x; } else if (arg0 == "Xception2") { Xception2 x = new Xception2(); x.ErrorCode = 2002; x.Struct_thing = new Xtruct(); x.Struct_thing.String_thing = "This is an Xception2"; throw x; } Xtruct result = new Xtruct(); result.String_thing = arg1; return result; }
public Task<Xtruct> testMultiExceptionAsync(string arg0, string arg1, CancellationToken cancellationToken) { logger.Invoke("testMultiException({0}, {1})", arg0, arg1); if (arg0 == "Xception") { var x = new Xception { ErrorCode = 1001, Message = "This is an Xception" }; throw x; } if (arg0 == "Xception2") { var x = new Xception2 { ErrorCode = 2002, Struct_thing = new Xtruct { String_thing = "This is an Xception2" } }; throw x; } var result = new Xtruct { String_thing = arg1 }; return Task.FromResult(result); }
public Xtruct testMultiException(string arg0, string arg1) { Console.WriteLine("testMultiException(" + arg0 + ", " + arg1 + ")"); if (arg0 == "Xception") { Xception x = new Xception(); x.ErrorCode = 1001; x.Message = "This is an Xception"; throw x; } else if (arg0 == "Xception2") { Xception2 x = new Xception2(); x.ErrorCode = 2002; x.Struct_thing = new Xtruct(); x.Struct_thing.String_thing = "This is an Xception2"; throw x; } Xtruct result = new Xtruct(); result.String_thing = arg1; return result; }