Advertisement
Guest User

Untitled

a guest
Apr 26th, 2017
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.60 KB | None | 0 0
  1. public class ItemAddedToTab
  2. {
  3.  
  4. public ItemAddedToTab(
  5. Guid tabId,
  6. string menuItem,
  7. double price
  8. )
  9. {
  10.  
  11. if(tabId == Guid.Empty) throw ArgumentNullException("The tab id must be provided.");
  12. if(string.IsNullOrEmtpy(menuItem)) throw new ArgumentNullException("The menu item must be provided.");
  13. if(price < 0) throw new ArgumentException("Price must be greater or equal to 0.")
  14.  
  15. TabId = tabId;
  16. MenuItem = menuItem;
  17. Price = price;
  18.  
  19. }
  20.  
  21. public Guid TabId { get; private set; }
  22.  
  23. public string MenuItem { get; private set; }
  24.  
  25. public double Price { get; private set; }
  26.  
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement