Updates referencesource to .NET 4.7
[mono.git] / mcs / class / referencesource / System.Data.Entity / System / Data / EntityClient / NameValuePair.cs
1 //------------------------------------------------------------------------------
2 // <copyright file="NameValuePair.cs" company="Microsoft">
3 //      Copyright (c) Microsoft Corporation.  All rights reserved.
4 // </copyright>
5
6 // @owner  Microsoft
7 // @backupOwner  Microsoft
8 //------------------------------------------------------------------------------
9
10 namespace System.Data.EntityClient
11 {
12     /// <summary>
13     /// Copied from System.Data.dll
14     /// </summary>
15     sealed internal class NameValuePair {
16         readonly private string _name;
17         readonly private string _value;
18         readonly private int _length;
19         private NameValuePair _next;
20
21         internal NameValuePair(string name, string value, int length) {
22             System.Diagnostics.Debug.Assert(!string.IsNullOrEmpty(name), "empty keyname");
23             _name = name;
24             _value = value;
25             _length = length;
26         }
27
28         internal NameValuePair Next {
29             get {
30                 return _next;
31             }
32             set {
33                 if ((null != _next) || (null == value)) {
34                     throw EntityUtil.InternalError(EntityUtil.InternalErrorCode.NameValuePairNext);
35                 }
36                 _next = value;
37             }
38         } 
39     }
40 }