/// <summary>
 /// Invokes event locally without validation and with empty Sender and ClientData.
 /// </summary>
 internal void InvokeLocally <T1, T2, T3, T4, T5, T6, T7>(CallSite <T1, T2, T3, T4, T5, T6, T7> site, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5, T6 arg6, T7 arg7)
 {
     using (MyEventContext.Set(default(EndpointId), null, false))
     {
         site.Handler(arg1, arg2, arg3, arg4, arg5, arg6, arg7);
     }
 }
 /// <summary>
 /// Reads arguments from stream and invokes event. Returns false when validation failed, otherwise true.
 /// </summary>
 public bool Invoke(CallSite callSite, BitStream stream, object obj, EndpointId source, MyClientStateBase clientState, bool validate)
 {
     using (MySerializerNetObject.Using(this))
         using (MyEventContext.Set(source, clientState, validate))
         {
             return(callSite.Invoke(stream, obj, validate) && !(validate && MyEventContext.Current.HasValidationFailed));
         }
 }
 public Token(MyEventContext newContext)
 {
     m_oldContext = m_current;
     m_current = newContext;
 }
Beispiel #4
0
 public Token(MyEventContext newContext)
 {
     m_oldContext = m_current;
     m_current    = newContext;
 }