Beispiel #1
0
 /// <summary>
 /// Publishes a message using <see cref="MessageBase{T}"/> to notify subscribers that one object has changed.
 /// This also includes which object was updated and why it was updated.
 /// </summary>
 /// <param name="updatedObject">The object that was updated.</param>
 /// <param name="state">The state of the object.</param>
 protected void PublishUpdated(TDomain updatedObject, EDomainState state = EDomainState.Updated) => this.Publish(new MessageBase <TDomain>(updatedObject, state));
Beispiel #2
0
 /// <summary>
 /// Initializes a new instance of MessageBase when wanting to notify with a certain object together with a given State.
 /// </summary>
 /// <param name="object">The object that should be passed along</param>
 /// <param name="state">The state of the object</param>
 public MessageBase(T @object, EDomainState state)
 {
     Object = @object;
     State  = state;
 }
Beispiel #3
0
 /// <summary>
 /// Publishes a message using <see cref="MessageBase{T}"/> to notify subscribers that one object has changed.
 /// This also includes which object was updated and why it was updated.
 /// </summary>
 /// <param name="updatedObject">The object that was updated.</param>
 /// <param name="state">The state of the object.</param>
 protected void PublishUpdated(TDomain updatedObject, EDomainState state = EDomainState.Updated)
 {
     this.Publish <MessageBase <TDomain> >(new MessageBase <TDomain>(updatedObject));
 }