VS2019我可以为生成的方法关闭Pascal样式吗?

时间:2019-05-01 08:16:41

标签: c# visual-studio-2019

对于我遇到的所有以前的Studio版本,在Winforms项目中添加的控件均以驼峰样式命名:例如Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'restArgument': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'rest.args' in value "{rest.args}" at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:379) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1350) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:580) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:503) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) public class RESTArgument { @Value(Argument.SERVER_PORT) private int serverPort; @Value(Argument.SERVER_ADDRESS) private String serverAddress; @Value(Argument.APP_NAME) private String applicationName; @Value(Argument.RESOURCE_NAME) private String resourceName; @Value(Argument.REST_ARGS) private Map<String,String> restArgs; public RESTArgument() { } public int getServerPort() { return serverPort; } public String getServerAddress() { return serverAddress; } public String getApplicationName() { return applicationName; } public String getResourceName() { return resourceName; } public Map<String,String> getRestArgs(){ return restArgs; } }

在VS2019中仍然如此。

所有自动生成的方法主体都使用控件的当前名称来生成方法名称,例如button1

现在,这种情况已经改变,并且生成的代码遵循使用Pascal样式的.NET样式指南,并读取button1_Click

这会造成令人讨厌的不一致,我就是讨厌它!

我在 Texteditor选项中进行了搜索,但是没有找到恢复到旧方法的方法。我希望这对我来说有点难。

0 个答案:

没有答案