public virtual string FormatMethodDeclaration(MethodInfo info, MethodDeclarationFormatting formatting) { if (formatting == MethodDeclarationFormatting.Unchanged) { return(FormatMethodDeclaration(info)); } if (info.IsAsyncMethod()) { if (formatting == MethodDeclarationFormatting.ChangeToSync) { return(FormatToSyncMethodDeclaration(info)); } return(FormatMethodDeclaration(info)); } if (formatting == MethodDeclarationFormatting.ChangeToAsync) { return(FormatToAsyncMethodDeclaration(info)); } return(FormatMethodDeclaration(info)); }
public void WriteMethod(MethodInfo method, MethodDeclarationFormatting declaration, Action <ClassGenerator> bodyGenerator, string modifier = "public virtual", string returnValue = null) { WriteMethod(FormatMethodDeclaration(method, declaration), bodyGenerator, modifier, returnValue); }