public virtual TArg WaitForProperty <TArg>(Partial <TArg> property) { if (!Object.ReferenceEquals(property, this)) { throw Completable.InvalidProperty(); } return(To <TArg> .Cast(Value)); }
public override void RegisterReceiver <TArg>(Partial <TArg> property, Action <TArg> valueReceiver) { if (base.ContainsProperty(property)) { base.RegisterReceiver(property, valueReceiver); return; } if (!ContainsProperty(property)) { throw Completable.InvalidProperty("property"); } Container.RegisterReceiver(property, valueReceiver); this.RegisterReceiver(this, arr => valueReceiver(To <TArg> .Cast(arr[((PartialElement)(object)property).Index]))); }
public virtual void RegisterReceiver <TArg>(Partial <TArg> property, Action <TArg> valueReceiver) { if (!Object.ReferenceEquals(property, this)) { throw Completable.InvalidProperty(); } if (IsValueCreated) { To <Action <T> > .Cast(valueReceiver).Invoke(Value); } else { receivers.Add(To <Action <T> > .Cast(valueReceiver)); } }
public override TArg WaitForProperty <TArg>(Partial <TArg> property) { if (base.ContainsProperty(property)) { return(base.WaitForProperty(property)); } if (!ContainsProperty(property)) { throw Completable.InvalidProperty("property"); } try{ return(Container.WaitForProperty(property)); }catch (PropertyIncompleteException) { return(To <TArg> .Cast(Value[((PartialElement)(object)property).Index])); } }