//helpers private static void Set(this ISignalREvent @event, ISignalREventHandler handler, string key, object value) { if (@event == null) { throw new ArgumentNullException(nameof(@event)); } if (handler == null) { throw new ArgumentNullException(nameof(handler)); } var theKey = string.Format("{0}_{1}", key, handler.GetType().FullName); @event.Bags[theKey] = value; }
private static object Get(this ISignalREvent @event, ISignalREventHandler handler, string key, object defaultValue) { if (@event == null) { throw new ArgumentNullException(nameof(@event)); } if (handler == null) { throw new ArgumentNullException(nameof(handler)); } var theKey = string.Format("{0}_{1}", key, handler.GetType().FullName); if ([email protected](theKey)) { return(defaultValue); } return(@event.Bags[theKey]); }