Exemple #1
0
        RegionEventPayload <TPayload> GetRegionEventPayload(TPayload payload)
        {
            var regionPayload = new RegionEventPayload <TPayload>();

            regionPayload.ViewModelRegions = PublishRegions;
            regionPayload.Sender           = Sender;
            regionPayload.PayLoad          = payload;
            return(regionPayload);
        }
 public bool ShouldListen <TPayload>(RegionEventPayload <TPayload> payload)
 {
     if (ListenRegions.Count == 0)
     {
         return(true);
     }
     if (payload.ViewModelRegions.Intersect(ListenRegions).Any())
     {
         return(true);
     }
     return(false);
 }