Esempio n. 1
0
        public async Task Notify(AssetChangedStatus @event)
        {
            var currentStatus = await Get();

            Log("Received notification: Asset colour has changed!");
            RaiseEvent(@event);
            await ConfirmEvents();

            var newStatus = await Get();

            Warn($"Owner color is {newStatus.Colour}");
            await _hub.Clients.All.AssetOwnerUpdate(new OwnerSummary
            {
                Name   = this.GetPrimaryKeyString(),
                Colour = newStatus.Colour,
                Reason = GetReason()
            });
        }
Esempio n. 2
0
 public Owner Apply(AssetChangedStatus @event)
 {
     Assets[@event.Asset.Name] = @event.Asset;
     return(this);
 }