示例#1
0
 public ShellComponent()
 {
     this.ConfigurationComponent     = new ConfigurationComponent();
     this.OwlveyGateway              = new OwlveyGateway(ConfigurationComponent);
     this.NotificationGateway        = new NotificationGateway(ConfigurationComponent);
     this.AvailabilityGuardComponent = new AvailabilityGuardComponent(this.OwlveyGateway);
 }
        public async Task SendNotification()
        {
            var gateway = new NotificationGateway(new ConfigurationComponent());
            List <NotificationEntity> notifications = new List <NotificationEntity>();

            var entity = new NotificationEntity();

            entity.AddWhom(new MemberEntity()
            {
                Email       = "*****@*****.**",
                Name        = "gregory valderrama",
                SlackMember = "UFR3ZBD6Y"
            });

            entity.AddServiceReason(new ServiceEntity()
            {
                Availability = 0.98m,
                SLO          = 0.99m,
                Name         = "service test",
                Budget       = -0.01m,
                Leaders      = "*****@*****.**"
            }, DateTime.Now, DateTime.Now);

            notifications.Add(entity);
            await gateway.SendNotifications(notifications);
        }
示例#3
0
 public async Task IsDataUpdateRequiredForMobileClient(String name, bool isRequired, String message)
 {
     await this.Start(name);
     await this.HubProxyPoint.Invoke("IsDataUpdateRequiredForMobileClient", name, isRequired, message + " #Source ID: " + this.sourceID);
     await NotificationGateway.GetInstance().SendMessage("New data was added. Your UI is updated/updating.");
 }