Ejemplo n.º 1
0
        public PolicySpecifiedDefinition(
            [NotNull] string entityType,
            IEnumerable <string> createPolicies = null,
            IEnumerable <string> updatePolicies = null,
            IEnumerable <string> deletePolicies = null) : base(entityType)
        {
            if (createPolicies != null)
            {
                CreatePolicies = CreatePolicies.Concat(createPolicies).ToList();
            }

            if (updatePolicies != null)
            {
                UpdatePolicies = UpdatePolicies.Concat(updatePolicies).ToList();
            }

            if (deletePolicies != null)
            {
                DeletePolicies = DeletePolicies.Concat(deletePolicies).ToList();
            }
        }
Ejemplo n.º 2
0
        public PolicySpecifiedDefinition(
            [NotNull] string entityType,
            IEnumerable <string> createPolicies = null,
            IEnumerable <string> updatePolicies = null,
            IEnumerable <string> deletePolicies = null)
        {
            EntityType = Check.NotNullOrEmpty(entityType, nameof(entityType));

            if (createPolicies != null)
            {
                CreatePolicies = CreatePolicies.Concat(createPolicies).ToList();
            }

            if (updatePolicies != null)
            {
                UpdatePolicies = UpdatePolicies.Concat(updatePolicies).ToList();
            }

            if (deletePolicies != null)
            {
                DeletePolicies = DeletePolicies.Concat(deletePolicies).ToList();
            }
        }