Previous CloneSet | Next CloneSet | Back to Main Report |
Clone Mass | Clones in CloneSet | Parameter Count | Clone Similarity | Syntax Category [Sequence Length] |
---|---|---|---|---|
24 | 4 | 4 | 0.968 | compilation_unit |
Clone Abstraction | Parameter Bindings |
Clone Instance (Click to see clone) | Line Count | Source Line | Source File |
---|---|---|---|
1 | 24 | 1 | src/NHibernate/Properties/CamelCaseUnderscoreStrategy.cs |
2 | 20 | 1 | src/NHibernate/Properties/PascalCaseMStrategy.cs |
3 | 25 | 1 | src/NHibernate/Properties/PascalCaseMUnderscoreStrategy.cs |
4 | 24 | 1 | src/NHibernate/Properties/PascalCaseUnderscoreStrategy.cs |
| ||||
namespace NHibernate.Properties { /// <summary> /// Implementation of <see cref="IFieldNamingStrategy"/> for fields that are prefixed with /// an underscore and the PropertyName is changed to camelCase. /// </summary> public class CamelCaseUnderscoreStrategy : IFieldNamingStrategy { #region IFieldNamingStrategy Members /// <summary> /// Converts the Property's name into a Field name by making the first character /// of the <c>propertyName</c> lowercase and prefixing it with an underscore. /// </summary> /// <param name="propertyName">The name of the mapped property.</param> /// <returns>The name of the Field in CamelCase format prefixed with an underscore.</returns> public string GetFieldName(string propertyName) { return "_" + propertyName.Substring(0, 1).ToLowerInvariant() + propertyName.Substring(1); } #endregion } } |
| ||||
namespace NHibernate.Properties { internal class PascalCaseMStrategy : IFieldNamingStrategy { #region IFieldNamingStrategy Members /// <summary> /// Converts the Property's name into a Field name by making the first character /// of the <c>propertyName</c> uppercase and prefixing it with the letter 'm'. /// </summary> /// <param name="propertyName">The name of the mapped property.</param> /// <returns>The name of the Field in PascalCase format prefixed with an 'm'.</returns> public string GetFieldName(string propertyName) { return "m" + propertyName.Substring(0, 1).ToUpperInvariant() + propertyName.Substring(1); } #endregion } } |
| ||||
namespace NHibernate.Properties { /// <summary> /// Implementation of <see cref="IFieldNamingStrategy"/> for fields that are prefixed with /// an <c>m_</c> and the first character in PropertyName capitalized. /// </summary> public class PascalCaseMUnderscoreStrategy : IFieldNamingStrategy { #region IFieldNamingStrategy Members /// <summary> /// Converts the Property's name into a Field name by making the first character /// of the <c>propertyName</c> uppercase and prefixing it with the letter 'm' /// and an underscore. /// </summary> /// <param name="propertyName">The name of the mapped property.</param> /// <returns>The name of the Field in PascalCase format prefixed with an 'm' and an underscore.</returns> public string GetFieldName(string propertyName) { return "m_" + propertyName.Substring(0, 1).ToUpperInvariant() + propertyName.Substring(1); } #endregion } } |
| ||||
namespace NHibernate.Properties { /// <summary> /// Implementation of <see cref="IFieldNamingStrategy"/> for fields that are prefixed with /// an <c>_</c> and the first character in PropertyName capitalized. /// </summary> public class PascalCaseUnderscoreStrategy : IFieldNamingStrategy { #region IFieldNamingStrategy Members /// <summary> /// Converts the Property's name into a Field name by making the first character /// of the <c>propertyName</c> uppercase and prefixing it with an underscore. /// </summary> /// <param name="propertyName">The name of the mapped property.</param> /// <returns>The name of the Field in PascalCase format prefixed with an underscore.</returns> public string GetFieldName(string propertyName) { return "_" + propertyName.Substring(0, 1).ToUpperInvariant() + propertyName.Substring(1); } #endregion } } |
| |||
namespace NHibernate.Properties { [[#variable70048280]]class [[#variable2983faa0]]: IFieldNamingStrategy { #region IFieldNamingStrategy Members /// <summary> /// Converts the Property's name into a Field name by making the first character /// of the <c>propertyName</c> lowercase and prefixing it with an underscore. /// of the <c>propertyName</c> uppercase and prefixing it with the letter 'm'. /// of the <c>propertyName</c> uppercase and prefixing it with the letter 'm' /// and an underscore. /// of the <c>propertyName</c> uppercase and prefixing it with an underscore. /// </summary> /// <param name="propertyName">The name of the mapped property.</param> /// <returns>The name of the Field in CamelCase format prefixed with an underscore.</returns> /// <returns>The name of the Field in PascalCase format prefixed with an 'm'.</returns> /// <returns>The name of the Field in PascalCase format prefixed with an 'm' and an underscore.</returns> /// <returns>The name of the Field in PascalCase format prefixed with an underscore.</returns> public string GetFieldName(string propertyName) { return [[#variable2983fa20]]+ propertyName.Substring(0, 1). [[#variable2983fa00]]() + propertyName.Substring(1); } #endregion } } |
CloneAbstraction |
Parameter Index | Clone Instance | Parameter Name | Value |
---|---|---|---|
1 | 1 | [[#70048280]] | /// <summary> /// Implementation of <see cref="IFieldNamingStrategy"/> for fields that are prefixed with /// an underscore and the PropertyName is changed to camelCase. /// </summary> public |
1 | 2 | [[#70048280]] | internal |
1 | 3 | [[#70048280]] | /// <summary> /// Implementation of <see cref="IFieldNamingStrategy"/> for fields that are prefixed with /// an <c>m_</c> and the first character in PropertyName capitalized. /// </summary> public |
1 | 4 | [[#70048280]] | /// <summary> /// Implementation of <see cref="IFieldNamingStrategy"/> for fields that are prefixed with /// an <c>_</c> and the first character in PropertyName capitalized. /// </summary> public |
2 | 1 | [[#2983faa0]] | CamelCaseUnderscoreStrategy |
2 | 2 | [[#2983faa0]] | PascalCaseMStrategy |
2 | 3 | [[#2983faa0]] | PascalCaseMUnderscoreStrategy |
2 | 4 | [[#2983faa0]] | PascalCaseUnderscoreStrategy |
3 | 1 | [[#2983fa20]] | "_" |
3 | 2 | [[#2983fa20]] | "m" |
3 | 3 | [[#2983fa20]] | "m_" |
3 | 4 | [[#2983fa20]] | "_" |
4 | 1 | [[#2983fa00]] | ToLowerInvariant |
4 | 2 | [[#2983fa00]] | ToUpperInvariant |
4 | 3 | [[#2983fa00]] | ToUpperInvariant |
4 | 4 | [[#2983fa00]] | ToUpperInvariant |