Example #1
0
        public CategoryByIdDataProducer(ICategoryPropertiesAvailableStatus properties, IProjectService2 projectService)
        {
            Requires.NotNull(properties, nameof(properties));
            Requires.NotNull(projectService, nameof(projectService));

            _properties     = properties;
            _projectService = projectService;
        }
Example #2
0
 public CategoryByIdDataProducer(ICategoryPropertiesAvailableStatus properties, IProjectService2 projectService)
 {
     _properties     = properties;
     _projectService = projectService;
 }
        public static IEntityValue CreateCategoryValue(IQueryExecutionContext queryExecutionContext, IEntityValue parent, Rule rule, Category category, int order, ICategoryPropertiesAvailableStatus requestedProperties)
        {
            Requires.NotNull(parent, nameof(parent));
            Requires.NotNull(category, nameof(category));

            var identity = new EntityIdentity(
                ((IEntityWithId)parent).Id,
                new KeyValuePair <string, string>[]
            {
                new(ProjectModelIdentityKeys.CategoryName, category.Name)
            });
Example #4
0
 public CategoryFromRuleDataProducer(ICategoryPropertiesAvailableStatus properties)
 {
     Requires.NotNull(properties, nameof(properties));
     _properties = properties;
 }
        public static IEntityValue CreateCategoryValue(IEntityValue parent, Rule rule, Category category, int order, ICategoryPropertiesAvailableStatus requestedProperties)
        {
            Requires.NotNull(parent, nameof(parent));
            Requires.NotNull(category, nameof(category));

            string categoryName = DebugUtilities.GetDebugCategoryNameOrNull(rule, category) ?? category.Name;

            var identity = new EntityIdentity(
                ((IEntityWithId)parent).Id,
                new KeyValuePair <string, string>[]
            {
                new(ProjectModelIdentityKeys.CategoryName, categoryName)
            });