1 // Licensed to the .NET Foundation under one or more agreements.
2 // The .NET Foundation licenses this file to you under the MIT license.
3 // See the LICENSE file in the project root for more information.
4 
5 namespace System.CodeDom
6 {
7     [Serializable]
8     public class CodeTypeParameter : CodeObject
9     {
10         private string _name;
11         private CodeAttributeDeclarationCollection _customAttributes;
12         private CodeTypeReferenceCollection _constraints;
13 
CodeTypeParameter()14         public CodeTypeParameter() { }
15 
CodeTypeParameter(string name)16         public CodeTypeParameter(string name)
17         {
18             _name = name;
19         }
20 
21         public string Name
22         {
23             get { return _name ?? string.Empty; }
24             set { _name = value; }
25         }
26 
27         public CodeTypeReferenceCollection Constraints => _constraints ?? (_constraints = new CodeTypeReferenceCollection());
28 
29         public CodeAttributeDeclarationCollection CustomAttributes => _customAttributes ?? (_customAttributes = new CodeAttributeDeclarationCollection());
30 
31         public bool HasConstructorConstraint { get; set; }
32     }
33 }
34 
35 
36