Example #1
0
            public TemplatePartDescriptionInfo(PropertyInfo propertyInfo)
            {
                var declaringPI   = propertyInfo.TransformToDeclaringType();
                var partAttribute = declaringPI.GetAttribute <TemplateContractPartAttribute>();

                Name     = partAttribute.Name ?? propertyInfo.Name;
                Required = partAttribute.Required;
                PartType = propertyInfo.PropertyType;
                Setter   = AccessorFactory.CreatePropertySetter <object, object>(declaringPI);
            }