コード例 #1
0
        public static bool VerifyADFilterCondition(ADFilterCondition adFilterCondition, out string error)
        {
            bool _success = false;

            error = string.Empty;

            if (adFilterCondition == null)
            {
                error = "ADFilterCondition can not be null";
            }
            else if (string.IsNullOrEmpty(adFilterCondition.ADAttributeName))
            {
                error = "ADAttributeName can not be empty";
            }
            else if (string.IsNullOrEmpty(adFilterCondition.ADAttributeValue))
            {
                error = "ADAttributeValue can not be empty";
            }
            else
            {
                _success = true;
            }

            return(_success);
        }
コード例 #2
0
        public void Add(ADFilterCondition adFilterCondition)
        {
            string _error = string.Empty;

            if (__adFilterCondition == null)
            {
                __adFilterCondition = new List <ADFilterCondition>();
            }

            if (!ADFilterBuilder.VerifyADFilterCondition(adFilterCondition, out _error))
            {
                throw new Exception($"Error Occurred while Adding Filter Condition. {_error}");
            }

            __adFilterCondition.Add(adFilterCondition);
        }