// Token: 0x06006E1B RID: 28187 RVA: 0x0017A6BC File Offset: 0x001788BC
 public IAsyncLocalValueMap Set(IAsyncLocal key, object value, bool treatNullValueAsNonexistent)
 {
     if (value != null || !treatNullValueAsNonexistent)
     {
         if (key == this._key1)
         {
             return(new AsyncLocalValueMap.ThreeElementAsyncLocalValueMap(key, value, this._key2, this._value2, this._key3, this._value3));
         }
         if (key == this._key2)
         {
             return(new AsyncLocalValueMap.ThreeElementAsyncLocalValueMap(this._key1, this._value1, key, value, this._key3, this._value3));
         }
         if (key == this._key3)
         {
             return(new AsyncLocalValueMap.ThreeElementAsyncLocalValueMap(this._key1, this._value1, this._key2, this._value2, key, value));
         }
         AsyncLocalValueMap.MultiElementAsyncLocalValueMap multiElementAsyncLocalValueMap = new AsyncLocalValueMap.MultiElementAsyncLocalValueMap(4);
         multiElementAsyncLocalValueMap.UnsafeStore(0, this._key1, this._value1);
         multiElementAsyncLocalValueMap.UnsafeStore(1, this._key2, this._value2);
         multiElementAsyncLocalValueMap.UnsafeStore(2, this._key3, this._value3);
         multiElementAsyncLocalValueMap.UnsafeStore(3, key, value);
         return(multiElementAsyncLocalValueMap);
     }
     else
     {
         if (key == this._key1)
         {
             return(new AsyncLocalValueMap.TwoElementAsyncLocalValueMap(this._key2, this._value2, this._key3, this._value3));
         }
         if (key == this._key2)
         {
             return(new AsyncLocalValueMap.TwoElementAsyncLocalValueMap(this._key1, this._value1, this._key3, this._value3));
         }
         if (key != this._key3)
         {
             return(this);
         }
         return(new AsyncLocalValueMap.TwoElementAsyncLocalValueMap(this._key1, this._value1, this._key2, this._value2));
     }
 }
            // Token: 0x06006E22 RID: 28194 RVA: 0x0017AC2C File Offset: 0x00178E2C
            public IAsyncLocalValueMap Set(IAsyncLocal key, object value, bool treatNullValueAsNonexistent)
            {
                int  count = base.Count;
                bool flag  = base.ContainsKey(key);

                if (value != null || !treatNullValueAsNonexistent)
                {
                    AsyncLocalValueMap.ManyElementAsyncLocalValueMap manyElementAsyncLocalValueMap = new AsyncLocalValueMap.ManyElementAsyncLocalValueMap(count + (flag ? 0 : 1));
                    foreach (KeyValuePair <IAsyncLocal, object> keyValuePair in this)
                    {
                        manyElementAsyncLocalValueMap[keyValuePair.Key] = keyValuePair.Value;
                    }
                    manyElementAsyncLocalValueMap[key] = value;
                    return(manyElementAsyncLocalValueMap);
                }
                if (!flag)
                {
                    return(this);
                }
                if (count == 17)
                {
                    AsyncLocalValueMap.MultiElementAsyncLocalValueMap multiElementAsyncLocalValueMap = new AsyncLocalValueMap.MultiElementAsyncLocalValueMap(16);
                    int num = 0;
                    foreach (KeyValuePair <IAsyncLocal, object> keyValuePair2 in this)
                    {
                        if (key != keyValuePair2.Key)
                        {
                            multiElementAsyncLocalValueMap.UnsafeStore(num++, keyValuePair2.Key, keyValuePair2.Value);
                        }
                    }
                    return(multiElementAsyncLocalValueMap);
                }
                AsyncLocalValueMap.ManyElementAsyncLocalValueMap manyElementAsyncLocalValueMap2 = new AsyncLocalValueMap.ManyElementAsyncLocalValueMap(count - 1);
                foreach (KeyValuePair <IAsyncLocal, object> keyValuePair3 in this)
                {
                    if (key != keyValuePair3.Key)
                    {
                        manyElementAsyncLocalValueMap2[keyValuePair3.Key] = keyValuePair3.Value;
                    }
                }
                return(manyElementAsyncLocalValueMap2);
            }