开发者

Naming a method, that setups up things, much like a ctor; Initialize is already taken

开发者 https://www.devze.com 2023-03-01 18:43 出处:网络
I have a simple naming problem. In my MVC code, I already have an i开发者_如何学Cnitialize method that is provided by the framework. I\'m thinking of another one that is called right before actions ar

I have a simple naming problem. In my MVC code, I already have an i开发者_如何学Cnitialize method that is provided by the framework. I'm thinking of another one that is called right before actions are executed.

It's basically like a second constructor, it setups essential data that is not available in the ctor. In fact, it's about data that is only available before an action executes.


You practically named it yourself: PrepareForActions.

0

精彩评论

暂无评论...
验证码 换一张
取 消