Пример #1
0
            public static IncidentMapEntity Create(DateTime on, string user,
                                                   FeatureEntity feature,
                                                   IncidentEntity incident)
            {
                var entity = new IncidentMapEntity()
                {
                    CreatedBy  = user,
                    CreatedOn  = on,
                    ModifiedBy = user,
                    ModifiedOn = on,
                    Feature    = feature,
                    Incident   = incident,
                };

                entity.Validate();
                return(entity);
            }
Пример #2
0
            public static IncidentEntity Create(string key, string title, DateTime on, string user, ProductEntity product)
            {
                var entity = new IncidentEntity()
                {
                    CreatedBy  = user,
                    CreatedOn  = on,
                    Key        = key,
                    Title      = title,
                    ModifiedBy = user,
                    ModifiedOn = on,
                    Tags       = "",
                    Url        = "https://landing.google.com/sre/books/",
                    TTD        = 10,
                    TTE        = 10,
                    TTF        = 10,
                    End        = on.AddMinutes(30),
                    Product    = product,
                    Affected   = 1
                };

                entity.Validate();
                return(entity);
            }