예제 #1
0
 public override IEnumerable <ClientSideQuery.NotFoundError> GetNotFoundErrors_IfThisIsTheOnlyFilter()
 {
     foreach (ClientSideQuery.PropertyValueFilter propertyValueFilter in base.PropertyValueFilters)
     {
         if (propertyValueFilter.BehaviorOnNoMatch != BehaviorOnNoMatch.ReportErrors || propertyValueFilter.HadMatch)
         {
             continue;
         }
         ClientSideQuery.PropertyValueRegularFilter propertyValueRegularFilter = (ClientSideQuery.PropertyValueRegularFilter)propertyValueFilter;
         yield return(propertyValueRegularFilter.GetGranularNotFoundError());
     }
 }
예제 #2
0
            public CimInstanceRegularFilter(string propertyName, IEnumerable allowedPropertyValues, bool wildcardsEnabled, BehaviorOnNoMatch behaviorOnNoMatch)
            {
                HashSet <BehaviorOnNoMatch> behaviorOnNoMatches = new HashSet <BehaviorOnNoMatch>();

                foreach (object allowedPropertyValue in allowedPropertyValues)
                {
                    ClientSideQuery.PropertyValueFilter propertyValueRegularFilter = new ClientSideQuery.PropertyValueRegularFilter(propertyName, allowedPropertyValue, wildcardsEnabled, behaviorOnNoMatch);
                    base.AddPropertyValueFilter(propertyValueRegularFilter);
                    behaviorOnNoMatches.Add(propertyValueRegularFilter.BehaviorOnNoMatch);
                }
                if (behaviorOnNoMatches.Count != 1)
                {
                    base.BehaviorOnNoMatch = behaviorOnNoMatch;
                    return;
                }
                else
                {
                    base.BehaviorOnNoMatch = behaviorOnNoMatches.Single <BehaviorOnNoMatch>();
                    return;
                }
            }
예제 #3
0
			public CimInstanceRegularFilter(string propertyName, IEnumerable allowedPropertyValues, bool wildcardsEnabled, BehaviorOnNoMatch behaviorOnNoMatch)
			{
				HashSet<BehaviorOnNoMatch> behaviorOnNoMatches = new HashSet<BehaviorOnNoMatch>();
				foreach (object allowedPropertyValue in allowedPropertyValues)
				{
					ClientSideQuery.PropertyValueFilter propertyValueRegularFilter = new ClientSideQuery.PropertyValueRegularFilter(propertyName, allowedPropertyValue, wildcardsEnabled, behaviorOnNoMatch);
					base.AddPropertyValueFilter(propertyValueRegularFilter);
					behaviorOnNoMatches.Add(propertyValueRegularFilter.BehaviorOnNoMatch);
				}
				if (behaviorOnNoMatches.Count != 1)
				{
					base.BehaviorOnNoMatch = behaviorOnNoMatch;
					return;
				}
				else
				{
					base.BehaviorOnNoMatch = behaviorOnNoMatches.Single<BehaviorOnNoMatch>();
					return;
				}
			}