public void Dispose() { m_Mode = CallbackMode.Unassigned; m_CallbackNoArgs = null; m_CallbackNativeArg = null; m_CallbackWithCastedArg = null; m_CastedArgInvoker = null; }
public void Set(Action inAction) { if (inAction == null) { throw new ArgumentNullException("inAction"); } m_Mode = CallbackMode.NoArg; m_CallbackNativeArg = null; m_CallbackWithCastedArg = null; m_CastedArgInvoker = null; m_CallbackNoArgs = inAction; }
private CastableAction(Action <T> inAction) { if (inAction == null) { throw new ArgumentNullException("inAction"); } m_Mode = CallbackMode.NativeArg; m_CallbackNativeArg = inAction; m_CallbackWithCastedArg = null; m_CastedArgInvoker = null; m_CallbackNoArgs = null; }
public void Set <U>(Action <U> inAction) { if (inAction == null) { throw new ArgumentNullException("inAction"); } m_Mode = CallbackMode.CastedArg; m_CallbackNativeArg = null; m_CallbackWithCastedArg = inAction; m_CastedArgInvoker = CastedActionInvoker <U> .Invoker; m_CallbackNoArgs = null; }
public void Set(Func <TOutput> inFunc) { if (inFunc == null) { throw new ArgumentNullException("inFunc"); } m_Mode = CallbackMode.NoArg; m_CallbackNativeArg = null; m_CallbackWithCastedArg = null; m_CastedArgInvoker = null; m_CallbackNoArgs = inFunc; }
private CastableFunc(Func <TInput, TOutput> inFunc) { if (inFunc == null) { throw new ArgumentNullException("inFunc"); } m_Mode = CallbackMode.NativeArg; m_CallbackNativeArg = inFunc; m_CallbackWithCastedArg = null; m_CastedArgInvoker = null; m_CallbackNoArgs = null; }
public void Set <U>(Func <U, TOutput> inFunc) { if (inFunc == null) { throw new ArgumentNullException("inFunc"); } m_Mode = CallbackMode.CastedArg; m_CallbackNativeArg = null; m_CallbackWithCastedArg = inFunc; m_CastedArgInvoker = CastedFuncInvoker <U, TOutput> .Invoker; m_CallbackNoArgs = null; }
private CastableAction(MulticastDelegate inCastedDelegate, CastedAction inCastedInvoker) { if (inCastedDelegate == null) { throw new ArgumentNullException("inCastedDelegate"); } if (inCastedInvoker == null) { throw new ArgumentNullException("inCastedInvoker"); } m_Mode = CallbackMode.CastedArg; m_CallbackNativeArg = null; m_CallbackWithCastedArg = inCastedDelegate; m_CastedArgInvoker = inCastedInvoker; m_CallbackNoArgs = null; }
internal override object ProcessReply(ref RedisResult result, out CallbackMode callbackMode) { RedisResult[] subItems; if (!result.IsError && (subItems = result.ValueItems) != null) { // detect "message" and "pmessage" and don't dequeue for those switch (subItems.Length) { case 3: // special-case message if (subItems[0].IsMatch(message)) { callbackMode = CallbackMode.Continuation; // events are a lot like continuations return(null); } break; case 4: // special-case pmessage if (subItems[0].IsMatch(pmessage)) { callbackMode = CallbackMode.Continuation; // events are a lot like continuations return(null); } break; } } var next = PeekSent(false) as IMultiReplyMessage; if (next == null || next.Consume()) { return(base.ProcessReply(ref result, out callbackMode)); } // if we get here, we are dealing with a multi-reply message that is not yet satisfied; do nothing callbackMode = CallbackMode.SyncUnchecked; // won't actually be doing anything return(null); }