Raven.Database.Indexing.FieldsToFetch.FieldsToFetch C# (CSharp) Méthode

FieldsToFetch() public méthode

public FieldsToFetch ( string fieldsToFetch, AggregationOperation aggregationOperation, string additionalField ) : System
fieldsToFetch string
aggregationOperation AggregationOperation
additionalField string
Résultat System
		public FieldsToFetch(string[] fieldsToFetch, AggregationOperation aggregationOperation, string additionalField)
		{
			this.additionalField = additionalField;
			if (fieldsToFetch != null)
			{
				this.fieldsToFetch = new HashSet<string>(fieldsToFetch);
				FetchAllStoredFields = this.fieldsToFetch.Remove(Constants.AllFields);
			}
			this.aggregationOperation = aggregationOperation.RemoveOptionals();

			if (this.aggregationOperation != AggregationOperation.None)
				EnsureHasField(this.aggregationOperation.ToString());
			
			IsDistinctQuery = aggregationOperation.HasFlag(AggregationOperation.Distinct) &&
							  fieldsToFetch != null && fieldsToFetch.Length > 0;
			
			IsProjection = this.fieldsToFetch != null && this.fieldsToFetch.Count > 0;
		
			if(IsProjection && IsDistinctQuery == false)
				EnsureHasField(additionalField);
		}