Пример #1
0
        public static PatternDto FromPattern(Guid id, AppPattern pattern, ApiController controller, string app)
        {
            var result = SimpleMapper.Map(pattern, new PatternDto {
                Id = id
            });

            return(result.CreateLinks(controller, app));
        }
Пример #2
0
        public static PatternDto FromPattern(DomainId id, AppPattern pattern, Resources resources)
        {
            var result = SimpleMapper.Map(pattern, new PatternDto {
                Id = id
            });

            return(result.CreateLinks(resources));
        }
Пример #3
0
 private static AppPatternAdded CreateInitialPattern(DomainId id, AppPattern pattern)
 {
     return(new AppPatternAdded
     {
         Name = pattern.Name,
         PatternId = id,
         Pattern = pattern.Pattern,
         Message = pattern.Message
     });
 }
Пример #4
0
 public JsonAppPattern(AppPattern pattern)
 {
     SimpleMapper.Map(pattern, this);
 }
Пример #5
0
 private static AppPatternAdded CreateInitialPattern(Guid id, AppPattern pattern)
 {
     return new AppPatternAdded { PatternId = id, Name = pattern.Name, Pattern = pattern.Pattern, Message = pattern.Message };
 }
Пример #6
0
 private static AppPatternAdded CreateInitialPattern(NamedId <Guid> appId, RefToken actor, Guid id, AppPattern p)
 {
     return(new AppPatternAdded {
         AppId = appId, Actor = actor, PatternId = id, Name = p.Name, Pattern = p.Pattern, Message = p.Message
     });
 }