示例#1
0
        public static AppSettingsDto FromApp(IAppEntity app, Resources resources)
        {
            var settings = app.Settings;

            var result = new AppSettingsDto
            {
                Editors = settings.Editors.Select(EditorDto.FromEditor).ToArray(),
                HideDateTimeModeButton = settings.HideDateTimeModeButton,
                HideScheduler          = settings.HideScheduler,
                Patterns = settings.Patterns.Select(PatternDto.FromPattern).ToArray(),
                Version  = app.Version
            };

            return(result.CreateLinks(resources));
        }
示例#2
0
        public static AppSettingsDto FromApp(IAppEntity app, Resources resources)
        {
            var settings = app.Settings;

            var result = new AppSettingsDto
            {
                HideScheduler = settings.HideScheduler,
                Patterns      =
                    settings.Patterns
                    .Select(x => SimpleMapper.Map(x, new PatternDto())).ToList(),
                Editors =
                    settings.Editors
                    .Select(x => SimpleMapper.Map(x, new EditorDto())).ToList(),
                Version = app.Version
            };

            return(result.CreateLinks(resources));
        }