private bool TryNameByGetMethod(string methodName, RenameVariables.ExpressionKind expressionKind) { if (!methodName.ToLower().StartsWith("get")) { return(false); } if (methodName.get_Length() > 3) { if (Char.IsUpper(methodName.get_Chars(3))) { if (methodName.get_Length() == 3) { return(false); } this.SuggestNameForMethod(expressionKind, methodName, 3); return(true); } if (methodName.get_Chars(3) == '\u005F') { if (methodName.get_Length() == 4) { return(false); } this.SuggestNameForMethod(expressionKind, methodName, 4); return(true); } } return(false); }
private void SuggestNameForMethod(RenameVariables.ExpressionKind expressionKind, string methodName, int startIndex) { V_0 = 0; if (expressionKind == 3) { V_0 = 1; } methodName = methodName.Substring(startIndex); methodName = this.Camelize(methodName, V_0); this.SuggestNameForThePendingVariable(methodName); return; }
private bool TryNameByToMethod(string methodName, RenameVariables.ExpressionKind expressionKind) { V_0 = methodName.IndexOf("To", 0); while (V_0 >= 0) { if (V_0 + 2 < methodName.get_Length() && Char.IsUpper(methodName.get_Chars(V_0 + 2))) { this.SuggestNameForMethod(expressionKind, methodName, V_0 + 2); return(true); } V_0 = methodName.IndexOf("To", V_0 + 1); } return(false); }