Advertisement
codeplanner

XSockets Controller - Methods With Order

Mar 5th, 2012
77
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.72 KB | None | 0 0
  1. [Export(typeof(IXBaseSocket))]    
  2. [XBaseSocketMetadata("Test", Constants.GenericTextBufferSize)]
  3. public class TestController : XBaseSocket
  4. {
  5.     [HandlerEvent("OnTest",Order=2)]
  6.     public void MyTestMethod1(XSocketEvent e)
  7.     {
  8.         //Do stuff in step 2
  9.         this.AsyncSend(e.PayLoad);
  10.     }
  11.  
  12.     [HandlerEvent("OnTest",Order=3)]
  13.     public void MyTestMethod2(XSocketEvent e)
  14.     {
  15.         //Do stuff in step 3
  16.         this.AsyncSend(e.PayLoad);
  17.     }
  18.  
  19.     [HandlerEvent("OnTest")]
  20.     public void MyTestMethod3(XSocketEvent e)
  21.     {
  22.         //Do stuff in step 1
  23.         this.AsyncSend(e.PayLoad);
  24.     }
  25.  
  26.     public override IXBaseSocket NewInstance()
  27.     {
  28.         return new TestController();
  29.     }
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement