Пример #1
0
            public static SquadFeatureEntity Create(SquadEntity squad, FeatureEntity feature, DateTime on, string createdBy)
            {
                var entity = new SquadFeatureEntity()
                {
                    Feature    = feature,
                    Squad      = squad,
                    CreatedBy  = createdBy,
                    ModifiedBy = createdBy,
                    CreatedOn  = on,
                    ModifiedOn = on,
                };

                entity.Validate();
                return(entity);
            }
Пример #2
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);
            }
Пример #3
0
            public static IndicatorEntity Create(FeatureEntity feature, SourceEntity source, DateTime on,
                                                 string user, string avatar = "https://cdn.iconscout.com/icon/free/png-256/avatar-375-456327.png")
            {
                var entity = new IndicatorEntity()
                {
                    Source     = source,
                    Feature    = feature,
                    CreatedBy  = user,
                    ModifiedBy = user,
                    CreatedOn  = on,
                    ModifiedOn = on,
                    Avatar     = avatar
                };

                entity.Validate();
                return(entity);
            }
Пример #4
0
            public static FeatureEntity Create(string name, DateTime on, string user,
                                               ProductEntity product)
            {
                var entity = new FeatureEntity()
                {
                    Name        = name,
                    Description = name,
                    CreatedBy   = user,
                    ModifiedBy  = user,
                    CreatedOn   = on,
                    ModifiedOn  = on,
                    Product     = product,
                };

                entity.Avatar = "https://cdn.iconscout.com/icon/premium/png-256-thumb/hexagonal-1-727847.png";
                entity.Validate();
                return(entity);
            }
Пример #5
0
            public static JourneyMapEntity Create(JourneyEntity journey, FeatureEntity feature, DateTime on, string createdBy)
            {
                var entity = new JourneyMapEntity()
                {
                    Journey    = journey,
                    Feature    = feature,
                    CreatedBy  = createdBy,
                    ModifiedBy = createdBy,
                    CreatedOn  = on,
                    ModifiedOn = on
                };

                if (journey.ProductId != feature.ProductId)
                {
                    throw new InvalidStateException("journey and feature must be come from same product");
                }

                entity.Validate();

                return(entity);
            }
Пример #6
0
 public void AddFeature(FeatureEntity entity)
 {
     entity.Product = this;
     this.Features.Add(entity);
 }