public virtual string GetInterfaceName(Type type) { var n = NamingHelper.GetNonGenericTypeName(type); if (type.IsInterface) { n = NamingHelper.RemovePrefix(InterfacePrefix, n, LetterCasing.Upper); n = InterfacePrefix + NamingHelper.FirstLetter(FirstLetterCasing, n); } else { n = InterfacePrefixForClasses + NamingHelper.FirstLetter(FirstLetterCasing, n); } return(n); }
public virtual string GetInterfaceName(DeclarationBase source) { var name = source.Name; if (source is InterfaceType) { if (name.StartsWith("I") && name.Substring(1, 1) == name.Substring(1, 1).ToUpper()) { //interface name like "IMyInterface" -> "IObservableMyInterface" name = "IObservable" + name.Substring(1); } else if (name.StartsWith("i")) { //class as interface "iMyclass" -> "iObservableMyClass" name = "iObservable" + NamingHelper.FirstLetter(LetterCasing.Upper, name.Substring(1)); } } else { name = "iObservable" + NamingHelper.FirstLetter(LetterCasing.Upper, name); } return(name); }
public override string GetClassName(Type type) { return(NamingHelper.FirstLetter(FirstLetterCasing, NamingHelper.GetNonGenericTypeName(type))); }
public virtual string GetEnumMemberName(FieldInfo value) { return(NamingHelper.FirstLetter(FirstLetterCasing, value.Name)); }
public virtual string GetEnumName(Type type) { return(NamingHelper.FirstLetter(FirstLetterCasing, type.Name)); }
public virtual string GetPropertyName(PropertyInfo property) { return(NamingHelper.FirstLetter(FirstLetterCasing, property.Name)); }