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); }
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); }
public static List <PropertyDecorator> Decorate(IEnumerable <PropertyDefinition> definitions, AssetDecorator asset) { return(definitions.Where(x => x.PropertyType.Compilable).Select(p => Decorate(p, asset)).ToList()); }