public object BuildItem(BuildItemArgs args)
 {
     var codon = args.Codon;
     var name = codon.Properties["name"];
     var extender = new ResourceExtender((FileProjectItem)args.Caller);
     var descriptor = TypeDescriptor.GetProperties(extender).Cast<PropertyDescriptor>().FirstOrDefault(x => x.Name == name);
     if (descriptor == null)
         throw new ArgumentException("Unknown ResourceExtender property " + name);
     return new ResourceExtenderProperty(descriptor, extender);
 }
        public object BuildItem(BuildItemArgs args)
        {
            var codon      = args.Codon;
            var name       = codon.Properties["name"];
            var extender   = new ResourceExtender((FileProjectItem)args.Caller);
            var descriptor = TypeDescriptor.GetProperties(extender).Cast <PropertyDescriptor>().FirstOrDefault(x => x.Name == name);

            if (descriptor == null)
            {
                throw new ArgumentException("Unknown ResourceExtender property " + name);
            }
            return(new ResourceExtenderProperty(descriptor, extender));
        }
 internal ResourceExtenderProperty(PropertyDescriptor descriptor, ResourceExtender extender)
     : base(descriptor)
 {
     this.descriptor = descriptor;
     this.extender = extender;
 }
 internal ResourceExtenderProperty(PropertyDescriptor descriptor, ResourceExtender extender) : base(descriptor)
 {
     this.descriptor = descriptor;
     this.extender   = extender;
 }