Exemplo n.º 1
0
 // Umbraco.Code.MapAll -Udi -HasPrevalues -IsSystemDataType -Id -Trashed -Key
 // Umbraco.Code.MapAll -ParentId -Path
 private static void Map(IDataEditor source, DataTypeBasic target, MapperContext context)
 {
     target.Alias = source.Alias;
     target.Group = source.Group;
     target.Icon  = source.Icon;
     target.Name  = source.Name;
 }
Exemplo n.º 2
0
        // Umbraco.Code.MapAll -HasPrevalues
        private void Map(IDataType source, DataTypeBasic target, MapperContext context)
        {
            target.Id = source.Id;
            target.IsSystemDataType = SystemIds.Contains(source.Id);
            target.Key      = source.Key;
            target.Name     = source.Name;
            target.ParentId = source.ParentId;
            target.Path     = source.Path;
            target.Trashed  = source.Trashed;
            target.Udi      = Udi.Create(Constants.UdiEntityType.DataType, source.Key);

            if (!_propertyEditors.TryGet(source.EditorAlias, out var editor))
            {
                return;
            }

            target.Alias = editor.Alias;
            target.Group = editor.Group;
            target.Icon  = editor.Icon;
        }