Exemplo n.º 1
0
 public void AddServiceReason(ServiceEntity service, DateTime start, DateTime end)
 {
     if (service.Budget < 0)
     {
         this.emotion = 2;
         this.AddWhat(service);
         this.AddWhere(service);
         this.AddWhen(start, end);
         this.AddWhy(service);
     }
     else
     {
         this.emotion = 5;
     }
 }
        public void Load(ServiceEntity entity, DateTime start, DateTime end)
        {
            this.service         = new Service();
            service.name         = entity.Name;
            service.slo          = entity.SLO;
            service.availability = entity.Availability;
            service.budget       = entity.Budget;
            service.feature_slo  = entity.FeatureSlo;
            this.start           = start.ToString("o");
            this.end             = end.ToString("o");

            foreach (var item in entity.Features)
            {
                this.features.Add(new Feature()
                {
                    availability = item.Availability,
                    budget       = item.Budget,
                    feature_slo  = item.FeatureSlo,
                    name         = item.Name
                });
            }
        }
Exemplo n.º 3
0
        public void AddWhy(ServiceEntity service)
        {
            string message = string.Format("Features in {0}", service.Name);

            this.why.Add(message);
        }
Exemplo n.º 4
0
        public void AddWhere(ServiceEntity service)
        {
            string message = string.Format("{0}", service.Name);

            this.where.Add(message);
        }
Exemplo n.º 5
0
        public void AddWhat(ServiceEntity service)
        {
            var message = string.Format("SLO {0}, current availability is {1} ", service.SLO, service.Availability);

            this.what.Add(message);
        }