اشتراک‌ها
صدور Exception یا بازگشت Result به عنوان خروجی متد، برای رسیدگی به خطاها

Summary

It’s pretty easy to differentiate use cases for Result and exceptions. Whenever the failure is something you expect and know how to deal with – catch it at the lowest level possible and convert into a Result instance. If you don’t know how to deal with it – let it propagate and interrupt the current business operation. Don’t catch exceptions you don’t know what to do about. 

صدور Exception یا بازگشت Result به عنوان خروجی متد، برای رسیدگی به خطاها
اشتراک‌ها
سری آموزش Visual Studio Toolbox: Design Patterns

This is the first of an eight part series where I am joined by Phil Japikse to discuss design patterns. A design pattern is a best practice you can use in your code to solve a common problem.  In this episode, Phil demonstrates the Command and Memento patterns. 

Episodes in this series:

  • Command/Memento patterns (this episode)
  • Strategy pattern
  • Template Method pattern (to be published 7/20)
  • Observer/Publish-Subscribe patterns (to be published 7/25)
  • Singleton pattern (to be published 8/8)
  • Factory patterns (to be published 8/10)
  • Adapter/Facade patterns (to be published 8/15)
  • Decorator pattern (to be published 8/17) 
سری آموزش Visual Studio Toolbox: Design Patterns