Exemple #1
0
        public void SetUp()
        {
            base.SetUp();

            attributeSetApplicationService = ApplicationContext.Current["attributeSetApplicationService"] as IAttributeSetApplicationService;
            attributeApplicationService    = ApplicationContext.Current["attributeApplicationService"] as IAttributeApplicationService;
        }
Exemple #2
0
        public static void CreateDefaultAttributeSets()
        {
            attributeApplicationService    = ApplicationContext.Current["attributeApplicationService"] as IAttributeApplicationService;
            attributeSetApplicationService = ApplicationContext.Current["attributeSetApplicationService"] as IAttributeSetApplicationService;

            var attributeSetBuilder = new AttributeSetBuilder <CreateAttributeSet, CreateAttribute, CreateAttributeValue, CreateAttributeUse>(new IdGenerator());

            IList <CreateAttribute>      attrs;
            IList <CreateAttributeValue> attrVals;
            IList <CreateAttributeSet>   attrSets;
            IList <CreateAttributeUse>   attrUses;

            attributeSetBuilder.BuildAttributeSetsFromEntityType(typeof(FluffPulpAttrSetInstance), out attrSets, out attrs, out attrVals, out attrUses);

            Save(attrs, attrSets);
        }
Exemple #3
0
 public static IEnumerable <IAttributeSetState> GetByProperty <TPropertyType>(this IAttributeSetApplicationService applicationService,
                                                                              System.Linq.Expressions.Expression <Func <IAttributeSetState, TPropertyType> > propertySelector,
                                                                              TPropertyType propertyValue, IList <string> orders = null, int firstResult = 0, int maxResults = int.MaxValue)
 {
     return(applicationService.GetByProperty(ReflectUtils.GetPropertyName <IAttributeSetState, TPropertyType>(propertySelector), propertyValue, orders, firstResult, maxResults));
 }