Example #1
0
 protected AppendSeries(Mutability mutability       = Mutability.ReadOnly,
                        KeySorting keySorting       = KeySorting.Strong,
                        KeyComparer <TKey> comparer = default,
                        MovingWindowOptions <TKey>?movingWindowOptions = default) : base(mutability, keySorting, comparer)
 {
     if (movingWindowOptions != null)
     {
         WindowOptions = new MovingWindowOptions(this, movingWindowOptions);
     }
 }
Example #2
0
        // There is no ctors for series because they are read-only,
        // only factories in static Series class

        internal Series(Mutability mutability       = Mutability.ReadOnly,
                        KeySorting keySorting       = KeySorting.Strong,
                        KeyComparer <TKey> comparer = default)
        {
            if (keySorting != KeySorting.Strong)
            {
                throw new NotImplementedException();
            }
            Flags     = new Flags(ContainerLayout.Series, keySorting, mutability);
            _comparer = comparer;
        }
Example #3
0
        // There is no ctors for series because they are read-only,
        // only factories in static Series class

        internal Series(Mutability mutability       = Mutability.ReadOnly,
                        KeySorting keySorting       = KeySorting.Strong,
                        KeyComparer <TKey> comparer = default)
        {
            // Need to touch these fields very early in a common not hot place for JIT static
            // readonly optimization even if tiered compilation is off.
            // Note single & to avoid short circuit.
            if (AdditionalCorrectnessChecks.Enabled
                & TypeHelper <TKey> .IsReferenceOrContainsReferences
                & TypeHelper <TValue> .IsReferenceOrContainsReferences)
            {
                ThrowHelper.Assert(!PrivateMemory <TKey> .ObjectPool.IsDisposed);
                ThrowHelper.Assert(!PrivateMemory <TValue> .ObjectPool.IsDisposed);
            }

            if (keySorting != KeySorting.Strong)
            {
                throw new NotImplementedException();
            }
            Flags     = new Flags(ContainerLayout.Series, keySorting, mutability);
            _comparer = comparer;
        }
Example #4
0
 internal Flags(ContainerLayout layout, KeySorting keySorting, Mutability mutability)
 {
     _value = (byte)((byte)layout | (byte)keySorting | (byte)mutability);
 }
Example #5
0
 public Flags(KeySorting keySorting, Mutability mutability)
 {
     _value = (byte)((byte)keySorting | (byte)mutability);
 }
Example #6
0
 public MutableSeries(KeyComparer <TKey> comparer, KeySorting keySorting, MovingWindowOptions <TKey> movingWindowOptions)
     : base(Mutability.Mutable, keySorting, comparer, movingWindowOptions)
 {
 }
Example #7
0
 public MutableSeries(KeySorting keySorting, MovingWindowOptions <TKey> movingWindowOptions)
     : base(Mutability.Mutable, keySorting, default, movingWindowOptions)
 {
 }
Example #8
0
 public MutableSeries(KeyComparer <TKey> comparer, KeySorting keySorting)
     : base(Mutability.Mutable, keySorting, comparer, default)
 {
 }
Example #9
0
 public MutableSeries(KeySorting keySorting)
     : base(Mutability.Mutable, keySorting)
 {
 }
Example #10
0
 public AppendSeries(KeyComparer <TKey> comparer, KeySorting keySorting, MovingWindowOptions <TKey> movingWindowOptions)
     : this(Mutability.AppendOnly, keySorting, comparer, movingWindowOptions)
 {
 }
Example #11
0
 public AppendSeries(KeySorting keySorting, MovingWindowOptions <TKey> movingWindowOptions)
     : this(Mutability.AppendOnly, keySorting, default, movingWindowOptions)
 {
 }
Example #12
0
 public AppendSeries(KeyComparer <TKey> comparer, KeySorting keySorting)
     : this(Mutability.AppendOnly, keySorting, comparer, default)
 {
 }
Example #13
0
 public AppendSeries(KeySorting keySorting)
     : this(Mutability.AppendOnly, keySorting)
 {
 }