Esempio n. 1
0
        public ISigo Set1(string key, ISigo value)
        {
            switch (value.Flags & Bits.CPLMR)
            {
            case Bits.MR: return(this);

            case Bits.LMR: return(Sigo.Create(Bits.LMR));

            default: return(Sigo.Create(Bits.LMR).Set1(key, value));
            }
        }
Esempio n. 2
0
        private ISigo Delete(int rf, string key)
        {
            rf = Bits.CountDown(rf);
            if (Bits.IsEmpty(rf))
            {
                return(Sigo.Create(Bits.Proton(rf)));
            }

            if (Bits.IsFrozen(rf))
            {
                return(new SigoTree(Bits.RemoveFrozen(rf), DictCloneRemove(key)));
            }
            else
            {
                Flags = rf;
                DictRemove(key);
                return(this);
            }
        }
Esempio n. 3
0
        private ISigo SetFlags(int rf)
        {
            if (rf == Flags)
            {
                return(this);
            }

            if (Bits.IsEmpty(rf))
            {
                return(Sigo.Create(Bits.Proton(rf)));
            }

            if (Bits.IsFrozen(rf))
            {
                return(new SigoTree(Bits.RemoveFrozen(rf), DictClone()));
            }
            else
            {
                Flags = rf;
                return(this);
            }
        }
Esempio n. 4
0
 public ISigo Get1(string key)
 {
     Paths.CheckKey(key);
     return(TryGetValue(key, out var value) ? value : Sigo.Create(Bits.Def(Flags)));
 }
Esempio n. 5
0
 public override int GetHashCode()
 {
     return(Sigo.GetHashCode(this));
 }
Esempio n. 6
0
 public override bool Equals(object obj)
 {
     return(obj is ISigo other && Sigo.Equals(this, other));
 }
Esempio n. 7
0
 public bool Equals(ISigo other)
 {
     return(Sigo.Equals(this, other));
 }
Esempio n. 8
0
 public ISigo Get1(string key)
 {
     Paths.CheckKey(key);
     return(Sigo.Create(Bits.MR));
 }