Exemple #1
0
        public AccessibilityResource WithSelections(ImmutableArray <AccessibilitySelection> selections)
        {
            var newResource = new AccessibilityResource(
                resourceCode: ResourceCode,
                currentSelectionCode: CurrentSelectionCode,
                order: Order,
                defaultSelection: DefaultSelection,
                selections: selections,
                label: Label,
                description: Description,
                disabled: Disabled,
                resourceType: ResourceTypeId);

            return(newResource);
        }
Exemple #2
0
        public AccessibilityResource WithCurrentSelection(string currentSelectionCode)
        {
            var newResource = new AccessibilityResource(
                resourceCode: ResourceCode,
                currentSelectionCode: currentSelectionCode,
                order: Order,
                defaultSelection: DefaultSelection,
                selections: Selections,
                label: Label,
                description: Description,
                disabled: Disabled,
                resourceType: ResourceTypeId);

            return(newResource);
        }
Exemple #3
0
        public AccessibilityResource ToDisabled()
        {
            var newSelections = Selections
                                .Select(sel => sel.WithDisabled(true))
                                .ToImmutableArray();

            var newResource = new AccessibilityResource(
                resourceCode: ResourceCode,
                currentSelectionCode: CurrentSelectionCode,
                order: Order,
                defaultSelection: DefaultSelection,
                selections: newSelections,
                label: Label,
                description: Description,
                disabled: true,
                resourceType: ResourceTypeId);

            return(newResource);
        }
Exemple #4
0
        public static AccessibilityResource Create(
            string resourceCode         = "",
            string currentSelectionCode = "",
            int order = -1,
            string defaultSelection = "",
            ImmutableArray <AccessibilitySelection> selections = default(ImmutableArray <AccessibilitySelection>),
            string label        = "",
            string description  = "",
            bool disabled       = false,
            string resourceType = "")
        {
            var resource = new AccessibilityResource(
                resourceCode: resourceCode,
                currentSelectionCode: currentSelectionCode,
                order: order,
                defaultSelection: defaultSelection,
                selections: selections,
                label: label,
                description: description,
                disabled: disabled,
                resourceType: resourceType);

            return(resource);
        }