Last active
November 15, 2016 05:15
-
-
Save netpyoung/1137ffddc555bb512be1df628a8c2160 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #region AutoGenerated | |
| public class DataQHello | |
| { | |
| public int A { get; set; } | |
| } | |
| public class DataRHello | |
| { | |
| public int A { get; set; } | |
| } | |
| public abstract class BaseResponseHello | |
| { | |
| public abstract void RHello(int a); | |
| public void RHello(DataRHello data) | |
| { | |
| RHello(data.A); | |
| } | |
| } | |
| public static void QHello(int A, BaseResponseHello callback) | |
| { | |
| QHello(new DataQHello { A = A }, callback); | |
| } | |
| #endregion AutoGenerated | |
| #region HandleLibrary | |
| private static void QHello(DataQHello hello, BaseResponseHello callback) | |
| { | |
| // TODO request handler | |
| callback.RHello(new DataRHello { A = 20 }); | |
| } | |
| #endregion HandleLibrary | |
| public class Example : BaseResponseHello | |
| { | |
| public void Start() | |
| { | |
| Program.QHello(A: 10, callback: this); | |
| } | |
| public override void RHello(int a) | |
| { | |
| Console.WriteLine(a); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment