示例#1
0
文件: Shop.cs 项目: shachafn/wsep192
 public void VerifyShopIsPermanentlyClosed()
 {
     if (!(ShopState.Equals(Shop.ShopStateEnum.PermanentlyClosed)))
     {
         StackTrace stackTrace = new StackTrace();
         throw new ShopStateException($"Shop {ShopName} is not closed or active. Cant complete method {stackTrace.GetFrame(1).GetMethod().Name}");
     }
 }
示例#2
0
文件: Shop.cs 项目: shachafn/wsep192
 public void VerifyShopIsActive()
 {
     if (!ShopState.Equals(Shop.ShopStateEnum.Active))
     {
         StackTrace stackTrace = new StackTrace();
         throw new ShopStateException($"Shop {ShopName} is not active. Cant complete method {stackTrace.GetFrame(1).GetMethod().Name}");
     }
 }