Exemplo n.º 1
0
        public static PropertyDecorator Decorate(PropertyDefinition definition, AssetDecorator asset)
        {
            PropertyDecorator decorator;

            decorator               = definition.PropertyType.CreateDecorator();
            decorator.Generator     = asset.Generator;
            decorator.Definition    = definition;
            decorator.DefiningAsset = asset;

            return(decorator);
        }
Exemplo n.º 2
0
        private ObjectDecorator CreateCommandObjectDefintion(AssetDecorator asset, string suffix)
        {
            ObjectDefinition def;

            def         = new ObjectDefinition();
            def.Deleted = false;
            def.Enabled = true;
            def.Guid    = Guid.NewGuid();
            def.Name    = asset.Name + suffix;
            def.Project = asset.Definition.Project;

            ObjectDecorator decorator;

            decorator           = new CommandObjectDecorator(def);
            decorator.Generator = this;

            return(decorator);
        }
Exemplo n.º 3
0
 public static List <PropertyDecorator> Decorate(IEnumerable <PropertyDefinition> definitions, AssetDecorator asset)
 {
     return(definitions.Where(x => x.PropertyType.Compilable).Select(p => Decorate(p, asset)).ToList());
 }