AggregateDictionary

Namespace: Nest
We found 10 examples in language CSharp for this search. You will see 19 fragments of code.
// Class info from mscorlib.dll
// 
using UnityEngine;

namespace System.Runtime.Remoting.Channels
{
    class AggregateDictionary : Object
    {
      // Fields:
  dictionaries : IDictionary[]
  _values : ArrayList
  _keys : ArrayList
      // Properties:
  IsFixedSize : Boolean
  IsReadOnly : Boolean
  Item : Object
  Keys : ICollection
  Values : ICollection
  Count : Int32
  IsSynchronized : Boolean
  SyncRoot : Object
      // Events:
      // Methods:
      public VoidRuntime.Remoting.Channels.AggregateDictionary::.ctorCollections.IDictionary[])
      Collections.IEnumeratorRuntime.Remoting.Channels.AggregateDictionary::System.Collections.IEnumerable.GetEnumerator()
      public BooleanRuntime.Remoting.Channels.AggregateDictionary::get_IsFixedSize()
      public BooleanRuntime.Remoting.Channels.AggregateDictionary::get_IsReadOnly()
      public ObjectRuntime.Remoting.Channels.AggregateDictionary::get_ItemObject)
      public VoidRuntime.Remoting.Channels.AggregateDictionary::set_ItemObjectObject)
      public Collections.ICollectionRuntime.Remoting.Channels.AggregateDictionary::get_Keys()
      public Collections.ICollectionRuntime.Remoting.Channels.AggregateDictionary::get_Values()
      public VoidRuntime.Remoting.Channels.AggregateDictionary::AddObjectObject)
      public VoidRuntime.Remoting.Channels.AggregateDictionary::Clear()
      public BooleanRuntime.Remoting.Channels.AggregateDictionary::ContainsObject)
      public Collections.IDictionaryEnumeratorRuntime.Remoting.Channels.AggregateDictionary::GetEnumerator()
      public VoidRuntime.Remoting.Channels.AggregateDictionary::RemoveObject)
      public VoidRuntime.Remoting.Channels.AggregateDictionary::CopyToArrayInt32)
      public Int32Runtime.Remoting.Channels.AggregateDictionary::get_Count()
      public BooleanRuntime.Remoting.Channels.AggregateDictionary::get_IsSynchronized()
      public ObjectRuntime.Remoting.Channels.AggregateDictionary::get_SyncRoot()
    }
}


        public static RequestData ForDictionary(IDictionary<string, object> dictionary)
        {
            AggregateDictionary dict = new AggregateDictionary().AddDictionary("Other", dictionary);
            return new RequestData(dict);
        }


        public static RequestData ForDictionary(IDictionary<string, object> dictionary)
        {
            AggregateDictionary dict = new AggregateDictionary().AddDictionary("Other", dictionary);
            return new RequestData(dict);
        }


        protected void OpenDictionary()
        {
            persistentSource = new FileBasedPersistentSource(tempPath, "test_");
            aggregateDictionary = new AggregateDictionary(persistentSource, 1);
            persistentDictionary = aggregateDictionary[0];
        }

        protected void PerformIdleTasks()
        {
            aggregateDictionary.PerformIdleTasks();
        }

        protected void Commit(Guid txId)
        {
            aggregateDictionary.Commit(txId);
        }


        #endregion

        protected void Commit(Guid txId)
        {
            aggregateDictionary.Commit(txId);
        }

        protected void OpenDictionary()
        {
            persistentSource = new FileBasedPersistentSource(Path.GetTempPath(), "test_");
            aggregateDictionary = new AggregateDictionary(persistentSource, 2);
            persistentDictionaryOne = aggregateDictionary[0];
            persistentDictionaryTwo = aggregateDictionary[1];
        }


        public AggregateDictionary AddLocator(string source, Func<string, object> locator,
                                              Func<IEnumerable<string>> allKeys)
        {
            _locators.Add(new Locator{
                Getter = locator,
                Source = source,
                AllKeys = allKeys
            });

            return this;
        }

        public AggregateDictionary AddDictionary(string source, IDictionary<string, object> dictionary)
        {
            AddLocator(source, key => dictionary.ContainsKey(key) ? dictionary[key] : null,
                       () => dictionary.Keys);
            return this;
        }

        public IRequestData DataFor(string source)
        {
            var dictionary = new AggregateDictionary();
            var locator = findLocator(source);
            dictionary._locators.Add(locator);

            return new RequestData(dictionary);
        }


        public IQueryable<T> Items<T>() where T : IAggregateRoot
        {
            ConcurrentDictionary<Guid, IAggregateRoot> aggregateDictionary;
            if (_items.TryGetValue(typeof(T), out aggregateDictionary))
            {
                return aggregateDictionary.Values.Cast<T>().AsQueryable();
            }

            return Enumerable.Empty<T>().AsQueryable();
        }


        public AggregateDictionary AddLocator(string source, Func<string, object> locator,
                                              Func<IEnumerable<string>> allKeys)
        {
            _locators.Add(new Locator{
                Getter = locator,
                Source = source,
                AllKeys = allKeys
            });

            return this;
        }

        public AggregateDictionary AddDictionary(string source, IDictionary<string, object> dictionary)
        {
            AddLocator(source, key => dictionary.ContainsKey(key) ? dictionary[key] : null,
                       () => dictionary.Keys);
            return this;
        }

        public IRequestData DataFor(string source)
        {
            var dictionary = new AggregateDictionary();
            var locator = findLocator(source);
            dictionary._locators.Add(locator);

            return new RequestData(dictionary);
        }


        public static RequestData ForDictionary(IDictionary<string, object> dictionary)
        {
            AggregateDictionary dict = new AggregateDictionary().AddDictionary(dictionary);
            return new RequestData(dict);
        }


        public static AggregateDictionary ForHttpContext(HttpContextWrapper context)
        {
            var dict = new AggregateDictionary();
            dict.configureForRequest(context);

            return dict;
        }

        public AggregateDictionary AddLocator(RequestDataSource source, Func<string, object> locator, Func<IEnumerable<string>> allKeys)
        {
            _locators.Add(new Locator
                          {
                              Getter = locator,
                              Source = source,
                              AllKeys = allKeys
                          });

            return this;
        }

        public AggregateDictionary AddDictionary(IDictionary<string, object> dictionary)
        {
            AddLocator(RequestDataSource.Other, key => dictionary.ContainsKey(key) ? dictionary[key] : null, () => dictionary.Keys);
            return this;
        }

Nest.AggregateDictionary : IIsAReadOnlyDictionary

Constructors :

public AggregateDictionary(IReadOnlyDictionary<String, IAggregate> backingDictionary = )

Methods :

public static AggregateDictionary get_Default()
public ValueAggregate Min(String key = )
public ValueAggregate Max(String key = )
public ValueAggregate Sum(String key = )
public ValueAggregate Cardinality(String key = )
public ValueAggregate Average(String key = )
public ValueAggregate ValueCount(String key = )
public ValueAggregate AverageBucket(String key = )
public ValueAggregate Derivative(String key = )
public ValueAggregate SumBucket(String key = )
public ValueAggregate MovingAverage(String key = )
public ValueAggregate CumulativeSum(String key = )
public ValueAggregate CumulativeCardinality(String key = )
public ValueAggregate BucketScript(String key = )
public ValueAggregate SerialDifferencing(String key = )
public ValueAggregate WeightedAverage(String key = )
public KeyedValueAggregate MaxBucket(String key = )
public KeyedValueAggregate MinBucket(String key = )
public ScriptedMetricAggregate ScriptedMetric(String key = )
public StatsAggregate Stats(String key = )
public StringStatsAggregate StringStats(String key = )
public TopMetricsAggregate TopMetrics(String key = )
public StatsAggregate StatsBucket(String key = )
public ExtendedStatsAggregate ExtendedStats(String key = )
public ExtendedStatsAggregate ExtendedStatsBucket(String key = )
public GeoBoundsAggregate GeoBounds(String key = )
public GeoLineAggregate GeoLine(String key = )
public PercentilesAggregate Percentiles(String key = )
public PercentilesAggregate PercentilesBucket(String key = )
public PercentilesAggregate MovingPercentiles(String key = )
public PercentilesAggregate PercentileRanks(String key = )
public TopHitsAggregate TopHits(String key = )
public FiltersAggregate Filters(String key = )
public SingleBucketAggregate Global(String key = )
public SingleBucketAggregate Filter(String key = )
public SingleBucketAggregate Missing(String key = )
public SingleBucketAggregate Nested(String key = )
public ValueAggregate Normalize(String key = )
public SingleBucketAggregate ReverseNested(String key = )
public SingleBucketAggregate Children(String key = )
public SingleBucketAggregate Parent(String key = )
public SingleBucketAggregate Sampler(String key = )
public SingleBucketAggregate DiversifiedSampler(String key = )
public GeoCentroidAggregate GeoCentroid(String key = )
public SignificantTermsAggregate<TKey> SignificantTerms(String key = )
public SignificantTermsAggregate<String> SignificantTerms(String key = )
public SignificantTermsAggregate<TKey> SignificantText(String key = )
public SignificantTermsAggregate<String> SignificantText(String key = )
public TermsAggregate<TKey> Terms(String key = )
public TermsAggregate<String> Terms(String key = )
public MultiBucketAggregate<KeyedBucket<Double>> Histogram(String key = )
public MultiBucketAggregate<KeyedBucket<String>> GeoHash(String key = )
public MultiBucketAggregate<KeyedBucket<String>> GeoTile(String key = )
public MultiBucketAggregate<KeyedBucket<String>> AdjacencyMatrix(String key = )
public MultiBucketAggregate<RareTermsBucket<TKey>> RareTerms(String key = )
public ValueAggregate Rate(String key = )
public MultiBucketAggregate<RareTermsBucket<String>> RareTerms(String key = )
public MultiBucketAggregate<RangeBucket> Range(String key = )
public MultiBucketAggregate<RangeBucket> DateRange(String key = )
public MultiBucketAggregate<IpRangeBucket> IpRange(String key = )
public MultiBucketAggregate<RangeBucket> GeoDistance(String key = )
public MultiBucketAggregate<DateHistogramBucket> DateHistogram(String key = )
public MultiBucketAggregate<VariableWidthHistogramBucket> VariableWidthHistogram(String key = )
public MultiTermsAggregate<String> MultiTerms(String key = )
public MultiTermsAggregate<TKey> MultiTerms(String key = )
public AutoDateHistogramAggregate AutoDateHistogram(String key = )
public CompositeBucketAggregate Composite(String key = )
public MatrixStatsAggregate MatrixStats(String key = )
public ValueAggregate MedianAbsoluteDeviation(String key = )
public BoxplotAggregate Boxplot(String key = )
public ValueAggregate TTest(String key = )
public Int32 get_Count()
public IAggregate get_Item(String key = )
public IEnumerable<String> get_Keys()
public IEnumerable<IAggregate> get_Values()
public Boolean ContainsKey(String key = )
public Boolean TryGetValue(String key = , IAggregate& value = )
public Type GetType()
public String ToString()
public Boolean Equals(Object obj = )
public Int32 GetHashCode()

Other methods