public uint Register(ICancelDelegate callback) { if (ValueContainer != null) { callback.Invoke(ValueContainer); return(0); } checked { uint order = ++_registeredCount; _registeredCallbacks.Add(new RegisteredDelegate(order, callback)); return(order); } }
public RegisteredDelegate(uint order, ICancelDelegate callback) { this.callback = callback; this.order = order; }