コード例 #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}");
     }
 }