Microsoft.AspNet.Server.Kestrel.Http.FrameResponseHeaders.Append C# (CSharp) Method

Append() public method

public Append ( byte keyBytes, int keyOffset, int keyLength, string value ) : void
keyBytes byte
keyOffset int
keyLength int
value string
return void
        public unsafe void Append(byte[] keyBytes, int keyOffset, int keyLength, string value)
        {
            fixed(byte* ptr = keyBytes) { var pUB = ptr + keyOffset; var pUL = (ulong*)pUB; var pUI = (uint*)pUB; var pUS = (ushort*)pUB;
            switch(keyLength)
            {
                case 13:
                    {
                        if ((((pUL[0] & 16131893727263186911uL) == 5711458528024281411uL) && ((pUI[2] & 3755991007u) == 1330795598u) && ((pUB[12] & 223u) == 76u))) 
                        {
                            if (((_bits & 1L) != 0))
                            {
                                _CacheControl = AppendValue(_CacheControl, value);
                            }
                            else
                            {
                                _bits |= 1L;
                                _CacheControl = new[] {value};
                            }
                            return;
                        }
                    
                        if ((((pUL[0] & 18437701552104792031uL) == 3266321689424580419uL) && ((pUI[2] & 3755991007u) == 1196310866u) && ((pUB[12] & 223u) == 69u))) 
                        {
                            if (((_bits & 131072L) != 0))
                            {
                                _ContentRange = AppendValue(_ContentRange, value);
                            }
                            else
                            {
                                _bits |= 131072L;
                                _ContentRange = new[] {value};
                            }
                            return;
                        }
                    
                        if ((((pUL[0] & 16131858680330051551uL) == 4922237774822850892uL) && ((pUI[2] & 3755991007u) == 1162430025u) && ((pUB[12] & 223u) == 68u))) 
                        {
                            if (((_bits & 524288L) != 0))
                            {
                                _LastModified = AppendValue(_LastModified, value);
                            }
                            else
                            {
                                _bits |= 524288L;
                                _LastModified = new[] {value};
                            }
                            return;
                        }
                    
                        if ((((pUL[0] & 16140865742145839071uL) == 5921481788798223169uL) && ((pUI[2] & 3755991007u) == 1162300993u) && ((pUB[12] & 223u) == 83u))) 
                        {
                            if (((_bits & 1048576L) != 0))
                            {
                                _AcceptRanges = AppendValue(_AcceptRanges, value);
                            }
                            else
                            {
                                _bits |= 1048576L;
                                _AcceptRanges = new[] {value};
                            }
                            return;
                        }
                    }
                    break;
            
                case 10:
                    {
                        if ((((pUL[0] & 16131858542891098079uL) == 5283922227757993795uL) && ((pUS[4] & 57311u) == 20047u))) 
                        {
                            if (((_bits & 2L) != 0))
                            {
                                _Connection = AppendValue(_Connection, value);
                            }
                            else
                            {
                                _bits |= 2L;
                                _Connection = new[] {value};
                            }
                            return;
                        }
                    
                        if ((((pUL[0] & 16131858680330051551uL) == 5281668125874799947uL) && ((pUS[4] & 57311u) == 17750u))) 
                        {
                            if (((_bits & 8L) != 0))
                            {
                                _KeepAlive = AppendValue(_KeepAlive, value);
                            }
                            else
                            {
                                _bits |= 8L;
                                _KeepAlive = new[] {value};
                            }
                            return;
                        }
                    
                        if ((((pUL[0] & 16131858543427968991uL) == 5426643225946637651uL) && ((pUS[4] & 57311u) == 17737u))) 
                        {
                            if (((_bits & 134217728L) != 0))
                            {
                                _SetCookie = AppendValue(_SetCookie, value);
                            }
                            else
                            {
                                _bits |= 134217728L;
                                _SetCookie = new[] {value};
                            }
                            return;
                        }
                    }
                    break;
            
                case 4:
                    {
                        if ((((pUI[0] & 3755991007u) == 1163149636u))) 
                        {
                            if (((_bits & 4L) != 0))
                            {
                                _Date = AppendValue(_Date, value);
                            }
                            else
                            {
                                _bits |= 4L;
                                _Date = new[] {value};
                            }
                            return;
                        }
                    
                        if ((((pUI[0] & 3755991007u) == 1195463749u))) 
                        {
                            if (((_bits & 4194304L) != 0))
                            {
                                _ETag = AppendValue(_ETag, value);
                            }
                            else
                            {
                                _bits |= 4194304L;
                                _ETag = new[] {value};
                            }
                            return;
                        }
                    
                        if ((((pUI[0] & 3755991007u) == 1498562902u))) 
                        {
                            if (((_bits & 268435456L) != 0))
                            {
                                _Vary = AppendValue(_Vary, value);
                            }
                            else
                            {
                                _bits |= 268435456L;
                                _Vary = new[] {value};
                            }
                            return;
                        }
                    }
                    break;
            
                case 6:
                    {
                        if ((((pUI[0] & 3755991007u) == 1195463248u) && ((pUS[2] & 57311u) == 16717u))) 
                        {
                            if (((_bits & 16L) != 0))
                            {
                                _Pragma = AppendValue(_Pragma, value);
                            }
                            else
                            {
                                _bits |= 16L;
                                _Pragma = new[] {value};
                            }
                            return;
                        }
                    
                        if ((((pUI[0] & 3755991007u) == 1448232275u) && ((pUS[2] & 57311u) == 21061u))) 
                        {
                            if (((_bits & 67108864L) != 0))
                            {
                                _Server = AppendValue(_Server, value);
                            }
                            else
                            {
                                _bits |= 67108864L;
                                _Server = new[] {value};
                            }
                            return;
                        }
                    }
                    break;
            
                case 7:
                    {
                        if ((((pUI[0] & 3755991007u) == 1229017684u) && ((pUS[2] & 57311u) == 17740u) && ((pUB[6] & 223u) == 82u))) 
                        {
                            if (((_bits & 32L) != 0))
                            {
                                _Trailer = AppendValue(_Trailer, value);
                            }
                            else
                            {
                                _bits |= 32L;
                                _Trailer = new[] {value};
                            }
                            return;
                        }
                    
                        if ((((pUI[0] & 3755991007u) == 1380405333u) && ((pUS[2] & 57311u) == 17473u) && ((pUB[6] & 223u) == 69u))) 
                        {
                            if (((_bits & 128L) != 0))
                            {
                                _Upgrade = AppendValue(_Upgrade, value);
                            }
                            else
                            {
                                _bits |= 128L;
                                _Upgrade = new[] {value};
                            }
                            return;
                        }
                    
                        if ((((pUI[0] & 3755991007u) == 1314013527u) && ((pUS[2] & 57311u) == 20041u) && ((pUB[6] & 223u) == 71u))) 
                        {
                            if (((_bits & 512L) != 0))
                            {
                                _Warning = AppendValue(_Warning, value);
                            }
                            else
                            {
                                _bits |= 512L;
                                _Warning = new[] {value};
                            }
                            return;
                        }
                    
                        if ((((pUI[0] & 3755991007u) == 1230002245u) && ((pUS[2] & 57311u) == 17746u) && ((pUB[6] & 223u) == 83u))) 
                        {
                            if (((_bits & 262144L) != 0))
                            {
                                _Expires = AppendValue(_Expires, value);
                            }
                            else
                            {
                                _bits |= 262144L;
                                _Expires = new[] {value};
                            }
                            return;
                        }
                    }
                    break;
            
                case 17:
                    {
                        if ((((pUL[0] & 16131858542891098079uL) == 5928221808112259668uL) && ((pUL[1] & 16131858542891098111uL) == 5641115115480565037uL) && ((pUB[16] & 223u) == 71u))) 
                        {
                            if (((_bits & 64L) != 0))
                            {
                                _TransferEncoding = AppendValue(_TransferEncoding, value);
                            }
                            else
                            {
                                _bits |= 64L;
                                _TransferEncoding = new[] {value};
                            }
                            return;
                        }
                    
                        if ((((pUL[0] & 16131893727263186911uL) == 6143241228466999888uL) && ((pUL[1] & 16131858542891098079uL) == 6071207754897639508uL) && ((pUB[16] & 223u) == 69u))) 
                        {
                            if (((_bits & 16777216L) != 0))
                            {
                                _ProxyAutheticate = AppendValue(_ProxyAutheticate, value);
                            }
                            else
                            {
                                _bits |= 16777216L;
                                _ProxyAutheticate = new[] {value};
                            }
                            return;
                        }
                    }
                    break;
            
                case 3:
                    {
                        if ((((pUS[0] & 57311u) == 18774u) && ((pUB[2] & 223u) == 65u))) 
                        {
                            if (((_bits & 256L) != 0))
                            {
                                _Via = AppendValue(_Via, value);
                            }
                            else
                            {
                                _bits |= 256L;
                                _Via = new[] {value};
                            }
                            return;
                        }
                    
                        if ((((pUS[0] & 57311u) == 18241u) && ((pUB[2] & 223u) == 69u))) 
                        {
                            if (((_bits & 2097152L) != 0))
                            {
                                _Age = AppendValue(_Age, value);
                            }
                            else
                            {
                                _bits |= 2097152L;
                                _Age = new[] {value};
                            }
                            return;
                        }
                    }
                    break;
            
                case 5:
                    {
                        if ((((pUI[0] & 3755991007u) == 1330400321u) && ((pUB[4] & 223u) == 87u))) 
                        {
                            if (((_bits & 1024L) != 0))
                            {
                                _Allow = AppendValue(_Allow, value);
                            }
                            else
                            {
                                _bits |= 1024L;
                                _Allow = new[] {value};
                            }
                            return;
                        }
                    }
                    break;
            
                case 14:
                    {
                        if ((((pUL[0] & 18437701552104792031uL) == 3266321689424580419uL) && ((pUI[2] & 3755991007u) == 1196311884u) && ((pUS[6] & 57311u) == 18516u))) 
                        {
                            if (((_bits & 2048L) != 0))
                            {
                                _ContentLength = AppendValue(_ContentLength, value);
                            }
                            else
                            {
                                _bits |= 2048L;
                                _ContentLength = new[] {value};
                            }
                            return;
                        }
                    }
                    break;
            
                case 12:
                    {
                        if ((((pUL[0] & 18437701552104792031uL) == 3266321689424580419uL) && ((pUI[2] & 3755991007u) == 1162893652u))) 
                        {
                            if (((_bits & 4096L) != 0))
                            {
                                _ContentType = AppendValue(_ContentType, value);
                            }
                            else
                            {
                                _bits |= 4096L;
                                _ContentType = new[] {value};
                            }
                            return;
                        }
                    }
                    break;
            
                case 16:
                    {
                        if ((((pUL[0] & 18437701552104792031uL) == 3266321689424580419uL) && ((pUL[1] & 16131858542891098079uL) == 5138124782612729413uL))) 
                        {
                            if (((_bits & 8192L) != 0))
                            {
                                _ContentEncoding = AppendValue(_ContentEncoding, value);
                            }
                            else
                            {
                                _bits |= 8192L;
                                _ContentEncoding = new[] {value};
                            }
                            return;
                        }
                    
                        if ((((pUL[0] & 18437701552104792031uL) == 3266321689424580419uL) && ((pUL[1] & 16131858542891098079uL) == 4992030546487820620uL))) 
                        {
                            if (((_bits & 16384L) != 0))
                            {
                                _ContentLanguage = AppendValue(_ContentLanguage, value);
                            }
                            else
                            {
                                _bits |= 16384L;
                                _ContentLanguage = new[] {value};
                            }
                            return;
                        }
                    
                        if ((((pUL[0] & 18437701552104792031uL) == 3266321689424580419uL) && ((pUL[1] & 16131858542891098079uL) == 5642809484339531596uL))) 
                        {
                            if (((_bits & 32768L) != 0))
                            {
                                _ContentLocation = AppendValue(_ContentLocation, value);
                            }
                            else
                            {
                                _bits |= 32768L;
                                _ContentLocation = new[] {value};
                            }
                            return;
                        }
                    
                        if ((((pUL[0] & 16131858543427968991uL) == 5211884407196440407uL) && ((pUL[1] & 16131858542891098079uL) == 4995689643909598789uL))) 
                        {
                            if (((_bits & 536870912L) != 0))
                            {
                                _WWWAuthenticate = AppendValue(_WWWAuthenticate, value);
                            }
                            else
                            {
                                _bits |= 536870912L;
                                _WWWAuthenticate = new[] {value};
                            }
                            return;
                        }
                    }
                    break;
            
                case 11:
                    {
                        if ((((pUL[0] & 18437701552104792031uL) == 3266321689424580419uL) && ((pUS[4] & 57311u) == 17485u) && ((pUB[10] & 255u) == 53u))) 
                        {
                            if (((_bits & 65536L) != 0))
                            {
                                _ContentMD5 = AppendValue(_ContentMD5, value);
                            }
                            else
                            {
                                _bits |= 65536L;
                                _ContentMD5 = new[] {value};
                            }
                            return;
                        }
                    
                        if ((((pUL[0] & 16131893727263186911uL) == 5062377317797741906uL) && ((pUS[4] & 57311u) == 17748u) && ((pUB[10] & 223u) == 82u))) 
                        {
                            if (((_bits & 33554432L) != 0))
                            {
                                _RetryAfter = AppendValue(_RetryAfter, value);
                            }
                            else
                            {
                                _bits |= 33554432L;
                                _RetryAfter = new[] {value};
                            }
                            return;
                        }
                    }
                    break;
            
                case 8:
                    {
                        if ((((pUL[0] & 16131858542891098079uL) == 5642809484339531596uL))) 
                        {
                            if (((_bits & 8388608L) != 0))
                            {
                                _Location = AppendValue(_Location, value);
                            }
                            else
                            {
                                _bits |= 8388608L;
                                _Location = new[] {value};
                            }
                            return;
                        }
                    }
                    break;
            }}
            var key = System.Text.Encoding.ASCII.GetString(keyBytes, keyOffset, keyLength);
            StringValues existing;
            Unknown.TryGetValue(key, out existing);
            Unknown[key] = AppendValue(existing, value);
        }