/// <summary> /// Initializes a new instance of the SearchResultsResponse class. /// </summary> /// <param name="id">The id of the search, which includes the full /// url.</param> /// <param name="metadata">The metadata from search results.</param> /// <param name="value">The array of result values.</param> /// <param name="error">The error.</param> public SearchResultsResponse(string id = default(string), SearchMetadata metadata = default(SearchMetadata), System.Collections.Generic.IList <object> value = default(System.Collections.Generic.IList <object>), SearchError error = default(SearchError)) { Id = id; Metadata = metadata; Value = value; Error = error; }
public PSSearchMetadata(SearchMetadata metadata) { if (metadata != null) { this.ResultType = metadata.ResultType; this.Top = metadata.Top; this.Total = metadata.Total; this.Id = metadata.Id; List<PSCoreSummary> summaryList = new List<PSCoreSummary>(); if (metadata.CoreSummaries != null) { for (int i = 0; i < metadata.CoreSummaries.Count; i++) { summaryList.Add(new PSCoreSummary(metadata.CoreSummaries[i])); } } this.CoreSummaries = summaryList; this.Status = metadata.Status; this.StartTime = metadata.StartTime; this.LastUpdated = metadata.LastUpdated; this.ETag = metadata.ETag; List<PSSearchSort> sortList = new List<PSSearchSort>(); if (metadata.Sort != null) { for (int j = 0; j < metadata.Sort.Count; j++) { sortList.Add(new PSSearchSort(metadata.Sort[j])); } } this.Sort = sortList; this.RequestTime = metadata.RequestTime; this.AggregatedValueField = metadata.AggregatedValueField; this.AggregatedGroupingFields = metadata.AggregatedGroupingFields; this.Sum = metadata.Sum; this.Max = metadata.Max; this.Schema = new PSMetadataSchema(metadata.Schema); } }
/// <summary> /// Initializes a new instance of the SavedSearchesListResult class. /// </summary> /// <param name="metadata">The metadata from search results.</param> /// <param name="value">The array of result values.</param> public SavedSearchesListResult(SearchMetadata metadata = default(SearchMetadata), System.Collections.Generic.IList <SavedSearch> value = default(System.Collections.Generic.IList <SavedSearch>)) { Metadata = metadata; Value = value; }
/// <summary> /// Initializes a new instance of the SearchGetSchemaResponse class. /// </summary> /// <param name="metadata">The metadata from search results.</param> /// <param name="value">The array of result values.</param> public SearchGetSchemaResponse(SearchMetadata metadata = default(SearchMetadata), IList <SearchSchemaValue> value = default(IList <SearchSchemaValue>)) { Metadata = metadata; Value = value; CustomInit(); }
/// <summary> /// Initializes a new instance of the SearchGetSchemaResponse class. /// </summary> /// <param name="metadata">The metadata from search results.</param> /// <param name="value">The array of result values.</param> public SearchGetSchemaResponse(SearchMetadata metadata = default(SearchMetadata), System.Collections.Generic.IList <SearchSchemaValue> value = default(System.Collections.Generic.IList <SearchSchemaValue>)) { Metadata = metadata; Value = value; }