|
1 | 1 | namespace XmlSchemaClassGenerator |
2 | 2 | { |
3 | 3 | /// <summary> |
4 | | - /// Provides options to customize elementnamens with own logik |
| 4 | + /// Provides options to customize member names |
5 | 5 | /// </summary> |
6 | 6 | public class NamingProvider |
7 | 7 | { |
8 | | - /// <summary> |
9 | | - /// Scheme for the naming |
10 | | - /// </summary> |
11 | 8 | private readonly NamingScheme _namingScheme; |
12 | 9 |
|
13 | 10 | /// <summary> |
14 | | - /// Creates the provider |
| 11 | + /// Initializes a new instance of the <see cref="NamingProvider"/> class. |
15 | 12 | /// </summary> |
16 | | - /// <param name="namingScheme">Scheme for the naming</param> |
| 13 | + /// <param name="namingScheme">The naming scheme.</param> |
17 | 14 | public NamingProvider(NamingScheme namingScheme) |
18 | 15 | { |
19 | 16 | _namingScheme = namingScheme; |
20 | 17 | } |
21 | 18 |
|
22 | 19 | /// <summary> |
23 | | - /// Creates a name for a property of a type |
| 20 | + /// Creates a name for a property from an attribute name |
24 | 21 | /// </summary> |
25 | 22 | /// <param name="typeModelName">Name of the typeModel</param> |
26 | | - /// <param name="attributeName">Attributename in the orginal XML</param> |
27 | | - /// <returns>Name of the Property</returns> |
| 23 | + /// <param name="attributeName">Attribute name</param> |
| 24 | + /// <returns>Name of the property</returns> |
28 | 25 | public virtual string PropertyNameFromAttribute(string typeModelName, string attributeName) |
29 | 26 | { |
30 | 27 | return PropertyNameFromElement(typeModelName, attributeName); |
31 | 28 | } |
32 | 29 |
|
33 | 30 | /// <summary> |
34 | | - /// Creates a name for a property of a type |
| 31 | + /// Creates a name for a property from an element name |
35 | 32 | /// </summary> |
36 | 33 | /// <param name="typeModelName">Name of the typeModel</param> |
37 | | - /// <param name="elementName">Elementname in the orginal XML</param> |
38 | | - /// <returns>Name of the Property</returns> |
| 34 | + /// <param name="elementName">Element name</param> |
| 35 | + /// <returns>Name of the property</returns> |
39 | 36 | public virtual string PropertyNameFromElement(string typeModelName, string elementName) |
40 | 37 | { |
41 | 38 | return typeModelName.ToTitleCase(_namingScheme) + elementName.ToTitleCase(_namingScheme); |
42 | 39 | } |
43 | 40 |
|
44 | 41 | /// <summary> |
45 | | - /// Creates a name for an enummember based on a value |
| 42 | + /// Creates a name for an enum member based on a value |
46 | 43 | /// </summary> |
47 | 44 | /// <param name="enumName">Name of the enum</param> |
48 | | - /// <param name="value">Value in the original XML</param> |
49 | | - /// <returns>Name of the Enummember</returns> |
| 45 | + /// <param name="value">Value name</param> |
| 46 | + /// <returns>Name of the enum member</returns> |
50 | 47 | public virtual string EnumMemberNameFromValue(string enumName, string value) |
51 | 48 | { |
52 | 49 | return value.ToTitleCase(_namingScheme).ToNormalizedEnumName(); |
|
0 commit comments