15 private bool camelCase;
34 : this(caseSensitive: true)
51 identifiers =
new Hashtable(equalityComparer);
52 reservedIdentifiers =
new Hashtable(equalityComparer);
96 if (identifier.Length > 511)
107 reservedIdentifiers.
Add(identifier, identifier);
114 reservedIdentifiers.
Remove(identifier);
121 public string AddUnique(
string identifier,
object value)
124 Add(identifier, value);
134 if (!identifiers.
Contains(identifier))
136 return reservedIdentifiers.
Contains(identifier);
144 public void Add(
string identifier,
object value)
146 identifiers.
Add(identifier, value);
154 list.Remove(identifiers[identifier]);
155 identifiers.
Remove(identifier);
164 list.CopyTo(array, 0);
172 codeIdentifiers.reservedIdentifiers = (
Hashtable)reservedIdentifiers.
Clone();
173 codeIdentifiers.list = (
ArrayList)list.Clone();
174 codeIdentifiers.camelCase = camelCase;
175 return codeIdentifiers;
static CultureInfo InvariantCulture
Gets the T:System.Globalization.CultureInfo object that is culture-independent (invariant).
void Remove(string identifier)
Removes from the T:System.Xml.Serialization.CodeIdentifiers instance's scope the code entity or type ...
static string MakeCamel(string identifier)
Produces a camel-case string from an input string.
virtual void Add(object key, object value)
Adds an element with the specified key and value into the T:System.Collections.Hashtable.
string AddUnique(string identifier, object value)
Adds a named code entity or type mapping to the T:System.Xml.Serialization.CodeIdentifiers instance's...
bool IsInUse(string identifier)
Determines whether a specified name is already being used within the T:System.Xml....
virtual object Clone()
Creates a shallow copy of the T:System.Collections.Hashtable.
void Clear()
Removes all code entities or type mappings, including their names, from the T:System....
bool UseCamelCasing
Gets or sets a value that indicates whether the instance uses camel case.
void AddReserved(string identifier)
Prevents a specified name from being used within the T:System.Xml.Serialization.CodeIdentifiers insta...
CodeIdentifiers()
Initializes a new instance of the T:System.Xml.Serialization.CodeIdentifiers class.
void RemoveReserved(string identifier)
Removes the input name from the T:System.Xml.Serialization.CodeIdentifiers instance's reserved names.
Represents a collection of key/value pairs that are organized based on the hash code of the key....
Defines methods to support the comparison of objects for equality.
string MakeUnique(string identifier)
Determines whether the input name conflicts with another name within the T:System....
Provides methods for creating, manipulating, searching, and sorting arrays, thereby serving as the ba...
Represents type declarations: class types, interface types, array types, value types,...
string MakeRightCase(string identifier)
Ensures that the input is of the correct case by modifying the name according to the value of the P:S...
void Add(string identifier, object value)
Adds a named code entity or type mapping to the T:System.Xml.Serialization.CodeIdentifiers instance's...
virtual bool Contains(object key)
Determines whether the T:System.Collections.Hashtable contains a specific key.
static string MakePascal(string identifier)
Produces a Pascal-case string from an input string.
object ToArray(Type type)
Returns an array of the code entities or type mappings within the T:System.Xml.Serialization....
virtual void Remove(object key)
Removes the element with the specified key from the T:System.Collections.Hashtable.
virtual void Clear()
Removes all elements from the T:System.Collections.Hashtable.
Provides information about a specific culture (called a locale for unmanaged code development)....
Maintains a group of names for related code entities or type mappings that are generated by the ....
CodeIdentifiers(bool caseSensitive)
Initializes a new instance of the T:System.Xml.Serialization.CodeIdentifiers class and determines whe...
Provides static methods to convert input text into names for code entities.
static unsafe Array CreateInstance(Type elementType, int length)
Creates a one-dimensional T:System.Array of the specified T:System.Type and length,...
Implements the T:System.Collections.IList interface using an array whose size is dynamically increase...