public void DisplayRequestedAccount_TooManyAccountsReturned_ThrowsException() { //Arrange int requestedAccountNumber = 1126; // (mock data) List<Account> expectedList = new List<Account>(); Account expectedAccount = new Account(1126) { Balance = 1111.11, Type = "Checking" }; expectedList.Add(expectedAccount); expectedList.Add(expectedAccount); // important to add the same thing twice // (mock behaviour) var mockDataAccessLayer = new Mock<IDataAccessLayer>(); mockDataAccessLayer.Setup(dal => dal.GetAccountByNumber(It.IsAny<int>())).Returns(expectedList); // (piece under test) AccountActions actions = new AccountActions(mockDataAccessLayer.Object); //Act & Assert Assert.Throws<DuplicateAccountNumberException>(() => actions.DisplayRequestedAccount(requestedAccountNumber), "Multiple records with same account number were returned."); }
public ActionResult LogOff() { AuthenticationManager.SignOut(); AccountActions.SignOut(AuthenticationManager, User, this.HttpContext); return(RedirectToAction("Index", "Home")); }
public testNewSignerRequest(string arg0, Person[] arg1, string arg2, AccountActions arg3) { this.arg0 = arg0; this.arg1 = arg1; this.arg2 = arg2; this.arg3 = arg3; }
public verifyAuthorizedSignaturesRequest(string arg0, SignatureData[] arg1, byte[] arg2, AccountActions arg3) { this.arg0 = arg0; this.arg1 = arg1; this.arg2 = arg2; this.arg3 = arg3; }
public async Task <IActionResult> InsertAction([FromBody] AccountActionsInsertRequest request) { try { if (!ModelState.IsValid) { return(BadRequest()); } AccountActions accountActions = new AccountActions(); accountActions.Status = 1; accountActions.ResponsibleParty = request.EmployeeID; accountActions.Deadline = DateTime.Now; accountActions.ActionID = request.ActionID; accountActions.DateCompleted = DateTime.Now; accountActions.CompletedBy = request.EmployeeID; accountActions.AccountID = request.AccountID; accountActions.AdditionalData = request.AdditionalData; accountActions.UnitCost = 0; WorksContext.AccountActions.Add(accountActions); await WorksContext.SaveChangesAsync(); return(new ObjectResult(accountActions)); } catch (Exception ex) { WriteLog(ex, nameof(ActivityController) + "-" + nameof(InsertAction), LogLevel.Error, false); // status code = 400 return(BadRequest()); throw; } }
public FormAccountViewModel() { actions = new AccountActions(); UserTypes = new ObservableCollection <string>(); UserTypes.Add("Patient"); UserTypes.Add("Admin"); UserTypes.Add("Doctor"); }
//InviteUserModel InviteUser; private void InitializeActions() { accountActions = new AccountActions(); AutorizationCheck(AutorizationType); if (AutorizationType == AutorizationType.Authorize) { accountActions.CreateHeaders(AutorizationType, LoginResult); } }
public FormAccountViewModel() { actions = new AccountActions(); UserTypes = new ObservableCollection <string>(); UserTypes.Add("Client"); UserTypes.Add("Admin"); UserTypes.Add("Hotel employee"); Visible = "Hidden"; }
public void WithdrawNoAccountNumberReturnsFalse() { var account = new Mock <IAccount>(); account.Setup(x => x.balance).Returns(999.00); AccountActions actions = new AccountActions(); Assert.IsFalse(actions.Withdraw(account.Object, 10.05)); }
static void Main() { AccountActions system = new AccountActions(); Console.WriteLine("Hello there! This is better than that other example...\n"); Console.WriteLine(system.DisplayRequestedAccount(100)); Console.ReadLine(); }
public void PopulateAccountSettings() { AccountActions.Clear(); var changePassword = new AccountAction { AccountSetting = "ChangePassword", SettingText = "Change your password" }; AccountActions.Add(changePassword); }
public void WithdrawPositiveAmountReturnsTrue() { var account = new Mock <IAccount>(); account.Setup(x => x.balance).Returns(999.00); account.Setup(x => x.number).Returns("00001234"); AccountActions actions = new AccountActions(); Assert.IsTrue(actions.Withdraw(account.Object, 10.05)); }
public void DepositNegativeAmountReturnsFalse() { var account = new Mock <IAccount>(); account.Setup(x => x.balance).Returns(999.00); account.Setup(x => x.number).Returns("00001234"); AccountActions actions = new AccountActions(); Assert.IsFalse(actions.Deposit(account.Object, -10.05)); }
public AccountsViewModel(account cont) { _cont = cont; actions = new AccountActions(); if (cont.userType == "Admin") { IsAdmin = "Visible"; } else { IsAdmin = "Hidden"; } }
public void WithdrawOverdrawnReturnsFalse() { var account = new Mock <IAccount>(); account.Setup(x => x.balance).Returns(9.00); account.Setup(x => x.number).Returns("00001234"); AccountActions actions = new AccountActions(); actions.Withdraw(account.Object, 10.05); Assert.IsFalse(actions.Withdraw(account.Object, 10.05)); }
public void DepositPositiveAmountBalanceUpdated() { var account = new Mock <IAccount>(); account.SetupProperty(x => x.balance); account.Object.balance = 999.00; account.Setup(x => x.number).Returns("00001234"); AccountActions actions = new AccountActions(); actions.Deposit(account.Object, 10.05); Assert.AreEqual(999.0 + 10.05, account.Object.balance); }
public FormAccountViewModel(account account, account cont) { _cont = cont; _account = account; Email = account.email; Password = account.pass; UserType = account.idUserType.ToString(); //selec //selec actions = new AccountActions(); UserTypes = new ObservableCollection <string>(); UserTypes.Add("Patient"); UserTypes.Add("Admin"); UserTypes.Add("Doctor"); }
public FormAccountViewModel(account cont) { _cont = cont; actions = new AccountActions(); UserTypes = new ObservableCollection <string>(); UserTypes.Add("Client"); UserTypes.Add("Admin"); UserTypes.Add("Hotel employee"); Visible = "Hidden"; if (cont.userType == "Admin") { IsAdmin = "Visible"; } else { IsAdmin = "Hidden"; } }
public void TestLoggerWasCalled() { //Constructor injection var account = new Mock <IAccount>(); account.Setup(x => x.balance).Returns(9.00); account.Setup(x => x.number).Returns("00001234"); var logger = new Mock <ILogger>(); logger.Object.isAdmin = true; logger.Object.file = @"c:\log\error.log"; AccountActions actions = new AccountActions(logger.Object); actions.Withdraw(account.Object, 10.05); logger.Verify(x => x.log(It.IsAny <string>()), Times.Once); }
public void SetDefaultValue() { Final = false; Error = false; state = State0; boolExPosition = int.MinValue; BaseAction = BaseActions.None; Method = Methods.None; AccountAction = AccountActions.None; DomainName.SetDefaultValue(); Signature.SetDefaultValue(); Authname.SetDefaultValue(); UsersId.SetDefaultValue(); Username.SetDefaultValue(); Timestamp = long.MinValue; Count = int.MinValue; StartIndex = int.MinValue; OnSetDefaultValue(); }
public void DisplayRequestedAccount_AccountFound() { //Arrange // (mock data) List<Account> expectedList = new List<Account>(); Account expectedAccount = new Account(1126){Balance=1111.11,Type = "Checking"}; expectedList.Add(expectedAccount); // (mock behaviour) var mockDataAccessLayer = new Mock<IDataAccessLayer>(); mockDataAccessLayer.Setup(dal => dal.GetAccountByNumber(It.IsAny<int>())).Returns(expectedList); // (piece under test) AccountActions actions = new AccountActions(mockDataAccessLayer.Object); //Act String actualDisplay = actions.DisplayRequestedAccount(expectedAccount.Number); //Assert Assert.AreEqual(expectedAccount.ToString(),actualDisplay); }
public void DisplayRequestedAccount_AccountNotFound() { //Arrange // (mock data) List<Account> expectedList = null; int requestedAccountNumber = 1126; String expectedDisplay = "No accounts with number " + requestedAccountNumber + " were found."; // (mock behaviour) var mockDataAccessLayer = new Mock<IDataAccessLayer>(); mockDataAccessLayer.Setup(dal => dal.GetAccountByNumber(It.IsAny<int>())).Returns(expectedList); // (piece under test) AccountActions actions = new AccountActions(mockDataAccessLayer.Object); //Act String actualDisplay = actions.DisplayRequestedAccount(requestedAccountNumber); //Assert Assert.AreEqual(expectedDisplay,actualDisplay); }
public FormAccountViewModel(account account, account cont) { _cont = cont; _account = account; FullName = account.fullname; Email = account.email; Password = account.pass; UserType = account.userType; //selec actions = new AccountActions(); UserTypes = new ObservableCollection <string>(); UserTypes.Add("Client"); UserTypes.Add("Admin"); UserTypes.Add("Hotel employee"); Visible = "Visible"; if (cont.userType == "Admin") { IsAdmin = "Visible"; } else { IsAdmin = "Hidden"; } }
public int Parse(byte[] bytes, int offset, int length) { OnBeforeParse(); int i = offset; switch(state) { case State0: state = table0[bytes[i]]; break; case State1: state = table1[bytes[i]]; break; case State2: state = table2[bytes[i]]; break; case State3: state = table3[bytes[i]]; break; case State4: state = table4[bytes[i]]; break; case State5: state = table5[bytes[i]]; break; case State6: state = table6[bytes[i]]; break; case State7: state = table7[bytes[i]]; break; case State8: state = table8[bytes[i]]; break; case State9: state = table9[bytes[i]]; break; case State10: state = table10[bytes[i]]; break; case State11: state = table11[bytes[i]]; break; case State12: state = table12[bytes[i]]; break; case State13: state = table13[bytes[i]]; break; case State14: state = table14[bytes[i]]; break; case State15: state = table15[bytes[i]]; break; case State16: state = table16[bytes[i]]; break; case State17: state = table17[bytes[i]]; break; case State18: state = table18[bytes[i]]; break; case State19: state = table19[bytes[i]]; break; case State20: state = table20[bytes[i]]; break; case State21: state = table21[bytes[i]]; break; case State22: state = table22[bytes[i]]; break; case State23: state = table23[bytes[i]]; break; case State24: state = table24[bytes[i]]; break; case State25: state = table25[bytes[i]]; break; case State26: state = table26[bytes[i]]; break; case State27: state = table27[bytes[i]]; break; case State28: state = table28[bytes[i]]; break; case State29: state = table29[bytes[i]]; break; case State30: state = table30[bytes[i]]; break; case State31: state = table31[bytes[i]]; break; case State32: state = table32[bytes[i]]; break; case State33: state = table33[bytes[i]]; break; case State34: state = table34[bytes[i]]; break; case State35: state = table35[bytes[i]]; break; case State36: state = table36[bytes[i]]; break; case State37: state = table37[bytes[i]]; break; case State38: state = table38[bytes[i]]; break; case State39: state = table39[bytes[i]]; break; case State40: state = table40[bytes[i]]; break; case State41: state = table41[bytes[i]]; break; case State42: state = table42[bytes[i]]; break; case State43: state = table43[bytes[i]]; break; case State44: state = table44[bytes[i]]; break; case State45: state = table45[bytes[i]]; break; case State46: state = table46[bytes[i]]; break; case State47: state = table47[bytes[i]]; break; case State48: state = table48[bytes[i]]; break; case State49: state = table49[bytes[i]]; break; case State50: state = table50[bytes[i]]; break; case State51: state = table51[bytes[i]]; break; case State52: state = table52[bytes[i]]; break; case State53: state = table53[bytes[i]]; break; case State54: state = table54[bytes[i]]; break; case State55: state = table55[bytes[i]]; break; case State56: state = table56[bytes[i]]; break; case State57: state = table57[bytes[i]]; break; case State58: state = table58[bytes[i]]; break; case State59: state = table59[bytes[i]]; break; case State60: state = table60[bytes[i]]; break; case State61: state = table61[bytes[i]]; break; case State62: state = table62[bytes[i]]; break; case State63: state = table63[bytes[i]]; break; case State64: state = table64[bytes[i]]; break; case State65: state = table65[bytes[i]]; break; case State66: state = table66[bytes[i]]; break; case State67: state = table67[bytes[i]]; break; case State68: state = table68[bytes[i]]; break; case State69: state = table69[bytes[i]]; break; case State70: state = table70[bytes[i]]; break; case State71: state = table71[bytes[i]]; break; case State72: state = table72[bytes[i]]; break; case State73: state = table73[bytes[i]]; break; case State74: state = table74[bytes[i]]; break; case State75: state = table75[bytes[i]]; break; case State76: state = table76[bytes[i]]; break; case State77: state = table77[bytes[i]]; break; case State78: state = table78[bytes[i]]; break; case State79: state = table79[bytes[i]]; break; case State80: state = table80[bytes[i]]; break; case State81: state = table81[bytes[i]]; break; case State82: state = table82[bytes[i]]; break; case State83: state = table83[bytes[i]]; break; case State84: state = table84[bytes[i]]; break; case State85: state = table85[bytes[i]]; break; case State86: state = table86[bytes[i]]; break; case State87: state = table87[bytes[i]]; break; case State88: state = table88[bytes[i]]; break; case State89: state = table89[bytes[i]]; break; case State90: state = table90[bytes[i]]; break; case State91: state = table91[bytes[i]]; break; case State92: state = table92[bytes[i]]; break; case State93: state = table93[bytes[i]]; break; case State94: state = table94[bytes[i]]; break; case State95: state = table95[bytes[i]]; break; case State96: state = table96[bytes[i]]; break; case State97: state = table97[bytes[i]]; break; case State98: state = table98[bytes[i]]; break; case State99: state = table99[bytes[i]]; break; case State100: state = table100[bytes[i]]; break; case State101: state = table101[bytes[i]]; break; case State102: state = table102[bytes[i]]; break; case State103: state = table103[bytes[i]]; break; case State104: state = table104[bytes[i]]; break; case State105: state = table105[bytes[i]]; break; case State106: state = table106[bytes[i]]; break; case State107: state = table107[bytes[i]]; break; case State108: state = table108[bytes[i]]; break; case State109: state = table109[bytes[i]]; break; case State110: state = table110[bytes[i]]; break; case State111: state = table111[bytes[i]]; break; case State112: state = table112[bytes[i]]; break; case State113: state = table113[bytes[i]]; break; case State114: state = table114[bytes[i]]; break; case State115: state = table115[bytes[i]]; break; case State116: state = table116[bytes[i]]; break; case State117: state = table117[bytes[i]]; break; case State118: state = table118[bytes[i]]; break; case State119: state = table119[bytes[i]]; break; case State120: state = table120[bytes[i]]; break; case State121: state = table121[bytes[i]]; break; case State122: state = table122[bytes[i]]; break; case State123: state = table123[bytes[i]]; break; case State124: state = table124[bytes[i]]; break; case State125: state = table125[bytes[i]]; break; case State126: state = table126[bytes[i]]; break; case State127: state = table127[bytes[i]]; break; case State128: state = table128[bytes[i]]; break; case State129: state = table129[bytes[i]]; break; case State130: state = table130[bytes[i]]; break; case State131: state = table131[bytes[i]]; break; case State132: state = table132[bytes[i]]; break; case State133: state = table133[bytes[i]]; break; case State134: state = table134[bytes[i]]; break; case State135: state = table135[bytes[i]]; break; case State136: state = table136[bytes[i]]; break; case State137: state = table137[bytes[i]]; break; case State138: state = table138[bytes[i]]; break; case State139: state = table139[bytes[i]]; break; case State140: state = table140[bytes[i]]; break; case State141: state = table141[bytes[i]]; break; case State142: state = table142[bytes[i]]; break; case State143: state = table143[bytes[i]]; break; case State144: state = table144[bytes[i]]; break; case State145: state = table145[bytes[i]]; break; case State146: state = table146[bytes[i]]; break; case State147: state = table147[bytes[i]]; break; case State148: state = table148[bytes[i]]; break; case State149: state = table149[bytes[i]]; break; case State150: state = table150[bytes[i]]; break; case State151: state = table151[bytes[i]]; break; case State152: state = table152[bytes[i]]; break; case State153: state = table153[bytes[i]]; break; case State154: state = table154[bytes[i]]; break; case State155: state = table155[bytes[i]]; break; case State156: state = table156[bytes[i]]; break; case State157: state = table157[bytes[i]]; break; case State158: state = table158[bytes[i]]; break; case State159: state = table159[bytes[i]]; break; case State160: state = table160[bytes[i]]; break; case State161: state = table161[bytes[i]]; break; case State162: state = table162[bytes[i]]; break; case State163: state = table163[bytes[i]]; break; case State164: state = table164[bytes[i]]; break; case State165: state = table165[bytes[i]]; break; case State166: state = table166[bytes[i]]; break; case State167: state = table167[bytes[i]]; break; case State168: state = table168[bytes[i]]; break; case State169: state = table169[bytes[i]]; break; case State170: state = table170[bytes[i]]; break; case State171: state = table171[bytes[i]]; break; case State172: state = table172[bytes[i]]; break; case State173: state = table173[bytes[i]]; break; case State174: state = table174[bytes[i]]; break; case State175: state = table175[bytes[i]]; break; case State176: state = table176[bytes[i]]; break; case State177: state = table177[bytes[i]]; break; case State178: state = table178[bytes[i]]; break; case State179: state = table179[bytes[i]]; break; case State180: state = table180[bytes[i]]; break; case State181: state = table181[bytes[i]]; break; case State182: state = table182[bytes[i]]; break; case State183: state = table183[bytes[i]]; break; case State184: state = table184[bytes[i]]; break; case State185: state = table185[bytes[i]]; break; case State186: state = table186[bytes[i]]; break; case State187: state = table187[bytes[i]]; break; case State188: state = table188[bytes[i]]; break; case State189: state = table189[bytes[i]]; break; case State190: state = table190[bytes[i]]; break; case State191: state = table191[bytes[i]]; break; case State192: state = table192[bytes[i]]; break; case State193: state = table193[bytes[i]]; break; case State194: state = table194[bytes[i]]; break; case State195: state = table195[bytes[i]]; break; case State196: state = table196[bytes[i]]; break; case State197: state = table197[bytes[i]]; break; case State198: state = table198[bytes[i]]; break; case State199: state = table199[bytes[i]]; break; case State200: state = table200[bytes[i]]; break; case State201: state = table201[bytes[i]]; break; case State202: state = table202[bytes[i]]; break; case State203: state = table203[bytes[i]]; break; case State204: state = table204[bytes[i]]; break; case State205: state = table205[bytes[i]]; break; case State206: state = table206[bytes[i]]; break; case State207: state = table207[bytes[i]]; break; case State208: state = table208[bytes[i]]; break; case State209: state = table209[bytes[i]]; break; case State210: state = table210[bytes[i]]; break; case State211: state = table211[bytes[i]]; break; case State212: state = table212[bytes[i]]; break; case State213: state = table213[bytes[i]]; break; case State214: state = table214[bytes[i]]; break; case State215: state = table215[bytes[i]]; break; case State216: state = table216[bytes[i]]; break; case State217: state = table217[bytes[i]]; break; case State218: state = table218[bytes[i]]; break; case State219: state = table219[bytes[i]]; break; case State220: state = table220[bytes[i]]; break; case State221: state = table221[bytes[i]]; break; case State222: state = table222[bytes[i]]; break; case State223: state = table223[bytes[i]]; break; case State224: state = table224[bytes[i]]; break; case State225: state = table225[bytes[i]]; break; case State226: state = table226[bytes[i]]; break; case State227: state = table227[bytes[i]]; break; case State228: state = table228[bytes[i]]; break; case State229: state = table229[bytes[i]]; break; case State230: state = table230[bytes[i]]; break; case State231: state = table231[bytes[i]]; break; case State232: state = table232[bytes[i]]; break; case State233: state = table233[bytes[i]]; break; case State234: state = table234[bytes[i]]; break; case State235: state = table235[bytes[i]]; break; case State236: state = table236[bytes[i]]; break; case State237: state = table237[bytes[i]]; break; case State238: state = table238[bytes[i]]; break; case State239: state = table239[bytes[i]]; break; case State240: state = table240[bytes[i]]; break; case State241: state = table241[bytes[i]]; break; case State242: state = table242[bytes[i]]; break; case State243: state = table243[bytes[i]]; break; case State244: state = table244[bytes[i]]; break; case State245: state = table245[bytes[i]]; break; case State246: state = table246[bytes[i]]; break; case State247: state = table247[bytes[i]]; break; case State248: state = table248[bytes[i]]; break; case State249: state = table249[bytes[i]]; break; case State250: state = table250[bytes[i]]; break; case State251: state = table251[bytes[i]]; break; case State252: state = table252[bytes[i]]; break; case State253: state = table253[bytes[i]]; break; case State254: state = table254[bytes[i]]; break; case State255: state = table255[bytes[i]]; break; case State256: state = table256[bytes[i]]; break; case State257: state = table257[bytes[i]]; break; case State258: state = table258[bytes[i]]; break; case State259: state = table259[bytes[i]]; break; case State260: state = table260[bytes[i]]; break; case State261: state = table261[bytes[i]]; break; case State262: state = table262[bytes[i]]; break; case State263: state = table263[bytes[i]]; break; case State264: state = table264[bytes[i]]; break; case State265: state = table265[bytes[i]]; break; case State266: state = table266[bytes[i]]; break; case State267: state = table267[bytes[i]]; break; case State268: state = table268[bytes[i]]; break; case State269: state = table269[bytes[i]]; break; case State270: state = table270[bytes[i]]; break; case State271: state = table271[bytes[i]]; break; case State272: state = table272[bytes[i]]; break; case State273: state = table273[bytes[i]]; break; case State274: state = table274[bytes[i]]; break; case State275: state = table275[bytes[i]]; break; case State276: state = table276[bytes[i]]; break; case State277: state = table277[bytes[i]]; break; case State278: state = table278[bytes[i]]; break; case State279: Error = true; goto exit1; } i++; int end = offset + length; for( ; i < end; i++) { switch(state) { case State0: state = table0[bytes[i]]; break; case State1: state = table1[bytes[i]]; break; case State2: state = table2[bytes[i]]; break; case State3: state = table3[bytes[i]]; break; case State4: state = table4[bytes[i]]; break; case State5: state = table5[bytes[i]]; break; case State6: state = table6[bytes[i]]; break; case State7: state = table7[bytes[i]]; break; case State8: state = table8[bytes[i]]; break; case State9: state = table9[bytes[i]]; break; case State10: state = table10[bytes[i]]; break; case State11: state = table11[bytes[i]]; break; case State12: state = table12[bytes[i]]; break; case State13: state = table13[bytes[i]]; break; case State14: state = table14[bytes[i]]; break; case State15: state = table15[bytes[i]]; break; case State16: state = table16[bytes[i]]; break; case State17: state = table17[bytes[i]]; break; case State18: state = table18[bytes[i]]; break; case State19: state = table19[bytes[i]]; break; case State20: Final = true; BaseAction = BaseActions.Role; goto exit1; case State21: state = table21[bytes[i]]; break; case State22: state = table22[bytes[i]]; break; case State23: state = table23[bytes[i]]; break; case State24: state = table24[bytes[i]]; break; case State25: state = table25[bytes[i]]; break; case State26: state = table26[bytes[i]]; break; case State27: state = table27[bytes[i]]; break; case State28: state = table28[bytes[i]]; break; case State29: state = table29[bytes[i]]; break; case State30: state = table30[bytes[i]]; break; case State31: state = table31[bytes[i]]; break; case State32: state = table32[bytes[i]]; break; case State33: state = table33[bytes[i]]; break; case State34: state = table34[bytes[i]]; break; case State35: Final = true; BaseAction = BaseActions.Options; goto exit1; case State36: state = table36[bytes[i]]; break; case State37: state = table37[bytes[i]]; break; case State38: state = table38[bytes[i]]; break; case State39: state = table39[bytes[i]]; break; case State40: state = table40[bytes[i]]; break; case State41: state = table41[bytes[i]]; break; case State42: Final = true; BaseAction = BaseActions.Version; goto exit1; case State43: Final = true; BaseAction = BaseActions.Accounts; goto exit1; case State44: state = table44[bytes[i]]; break; case State45: state = table45[bytes[i]]; break; case State46: state = table46[bytes[i]]; break; case State47: state = table47[bytes[i]]; break; case State48: state = table48[bytes[i]]; break; case State49: state = table49[bytes[i]]; break; case State50: if(DomainName.Begin < 0)DomainName.Begin = i; state = table50[bytes[i]]; break; case State51: state = table51[bytes[i]]; break; case State52: state = table52[bytes[i]]; break; case State53: if(Signature.Begin < 0)Signature.Begin = i; state = table53[bytes[i]]; break; case State54: state = table54[bytes[i]]; break; case State55: state = table55[bytes[i]]; break; case State56: state = table56[bytes[i]]; break; case State57: DomainName.End = i; Final = true; goto exit1; case State58: state = table58[bytes[i]]; break; case State59: state = table59[bytes[i]]; break; case State60: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; state = table60[bytes[i]]; break; case State61: state = table61[bytes[i]]; break; case State62: state = table62[bytes[i]]; break; case State63: if(Authname.Begin < 0)Authname.Begin = i; state = table63[bytes[i]]; break; case State64: DomainName.End = i; Final = true; goto exit1; case State65: state = table65[bytes[i]]; break; case State66: state = table66[bytes[i]]; break; case State67: state = table67[bytes[i]]; break; case State68: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; state = table68[bytes[i]]; break; case State69: state = table69[bytes[i]]; break; case State70: Final = true; Timestamp = (Timestamp << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State71: Authname.End = i; Final = true; goto exit1; case State72: DomainName.End = i; Final = true; goto exit1; case State73: state = table73[bytes[i]]; break; case State74: Final = true; Count = (Count << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State75: state = table75[bytes[i]]; break; case State76: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; state = table76[bytes[i]]; break; case State77: Final = true; StartIndex = (StartIndex << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State78: Final = true; Timestamp = (Timestamp << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State79: Authname.End = i; Final = true; goto exit1; case State80: DomainName.End = i; Final = true; goto exit1; case State81: state = table81[bytes[i]]; break; case State82: Final = true; Count = (Count << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State83: state = table83[bytes[i]]; break; case State84: state = table84[bytes[i]]; break; case State85: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; state = table85[bytes[i]]; break; case State86: Final = true; StartIndex = (StartIndex << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State87: Final = true; Timestamp = (Timestamp << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State88: Authname.End = i; Final = true; goto exit1; case State89: DomainName.End = i; Final = true; goto exit1; case State90: state = table90[bytes[i]]; break; case State91: Final = true; Count = (Count << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State92: state = table92[bytes[i]]; break; case State93: state = table93[bytes[i]]; break; case State94: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; state = table94[bytes[i]]; break; case State95: Final = true; StartIndex = (StartIndex << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State96: Final = true; Timestamp = (Timestamp << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State97: Authname.End = i; Final = true; goto exit1; case State98: DomainName.End = i; Final = true; goto exit1; case State99: state = table99[bytes[i]]; break; case State100: Final = true; Count = (Count << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State101: state = table101[bytes[i]]; break; case State102: Final = true; Method = Methods.Put; goto exit1; case State103: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; state = table103[bytes[i]]; break; case State104: Final = true; StartIndex = (StartIndex << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State105: Final = true; Timestamp = (Timestamp << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State106: Authname.End = i; Final = true; goto exit1; case State107: DomainName.End = i; Final = true; goto exit1; case State108: Final = true; AccountAction = AccountActions.Userz; goto exit1; case State109: Final = true; Count = (Count << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State110: state = table110[bytes[i]]; break; case State111: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; state = table111[bytes[i]]; break; case State112: Final = true; StartIndex = (StartIndex << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State113: Final = true; Timestamp = (Timestamp << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State114: Authname.End = i; Final = true; goto exit1; case State115: DomainName.End = i; Final = true; goto exit1; case State116: if(UsersId.Begin < 0)UsersId.Begin = i; state = table116[bytes[i]]; break; case State117: Final = true; Count = (Count << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State118: state = table118[bytes[i]]; break; case State119: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; state = table119[bytes[i]]; break; case State120: Final = true; StartIndex = (StartIndex << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State121: Final = true; Timestamp = (Timestamp << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State122: Authname.End = i; Final = true; goto exit1; case State123: DomainName.End = i; Final = true; goto exit1; case State124: UsersId.End = i; Final = true; goto exit1; case State125: Final = true; Count = (Count << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State126: Final = true; Method = Methods.Delete; goto exit1; case State127: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; state = table127[bytes[i]]; break; case State128: Final = true; StartIndex = (StartIndex << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State129: Final = true; Timestamp = (Timestamp << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State130: Authname.End = i; Final = true; goto exit1; case State131: DomainName.End = i; Final = true; goto exit1; case State132: if(Username.Begin < 0)Username.Begin = i; state = table132[bytes[i]]; break; case State133: UsersId.End = i; Final = true; goto exit1; case State134: Final = true; Count = (Count << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State135: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; state = table135[bytes[i]]; break; case State136: Final = true; StartIndex = (StartIndex << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State137: Final = true; Timestamp = (Timestamp << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State138: Authname.End = i; Final = true; goto exit1; case State139: DomainName.End = i; Final = true; goto exit1; case State140: Username.End = i; Final = true; goto exit1; case State141: UsersId.End = i; Final = true; goto exit1; case State142: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; state = table142[bytes[i]]; break; case State143: Final = true; Timestamp = (Timestamp << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State144: Authname.End = i; Final = true; goto exit1; case State145: DomainName.End = i; Final = true; goto exit1; case State146: Username.End = i; Final = true; goto exit1; case State147: UsersId.End = i; Final = true; goto exit1; case State148: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; state = table148[bytes[i]]; break; case State149: Final = true; Timestamp = (Timestamp << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State150: Authname.End = i; Final = true; goto exit1; case State151: DomainName.End = i; Final = true; goto exit1; case State152: Username.End = i; Final = true; goto exit1; case State153: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; state = table153[bytes[i]]; break; case State154: Final = true; Timestamp = (Timestamp << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State155: Authname.End = i; Final = true; goto exit1; case State156: DomainName.End = i; Final = true; goto exit1; case State157: Username.End = i; Final = true; goto exit1; case State158: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; state = table158[bytes[i]]; break; case State159: Final = true; Timestamp = (Timestamp << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State160: Authname.End = i; Final = true; goto exit1; case State161: DomainName.End = i; Final = true; goto exit1; case State162: Username.End = i; Final = true; goto exit1; case State163: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; state = table163[bytes[i]]; break; case State164: Final = true; Timestamp = (Timestamp << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State165: Authname.End = i; Final = true; goto exit1; case State166: DomainName.End = i; Final = true; goto exit1; case State167: Username.End = i; Final = true; goto exit1; case State168: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; state = table168[bytes[i]]; break; case State169: Final = true; Timestamp = (Timestamp << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State170: Authname.End = i; Final = true; goto exit1; case State171: DomainName.End = i; Final = true; goto exit1; case State172: Username.End = i; Final = true; goto exit1; case State173: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; state = table173[bytes[i]]; break; case State174: Final = true; Timestamp = (Timestamp << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State175: Authname.End = i; Final = true; goto exit1; case State176: DomainName.End = i; Final = true; goto exit1; case State177: Username.End = i; Final = true; goto exit1; case State178: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; state = table178[bytes[i]]; break; case State179: Authname.End = i; Final = true; goto exit1; case State180: DomainName.End = i; Final = true; goto exit1; case State181: Username.End = i; Final = true; goto exit1; case State182: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; state = table182[bytes[i]]; break; case State183: Authname.End = i; Final = true; goto exit1; case State184: DomainName.End = i; Final = true; goto exit1; case State185: Username.End = i; Final = true; goto exit1; case State186: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; state = table186[bytes[i]]; break; case State187: Authname.End = i; Final = true; goto exit1; case State188: DomainName.End = i; Final = true; goto exit1; case State189: Username.End = i; Final = true; goto exit1; case State190: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; state = table190[bytes[i]]; break; case State191: Authname.End = i; Final = true; goto exit1; case State192: DomainName.End = i; Final = true; goto exit1; case State193: Username.End = i; Final = true; goto exit1; case State194: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; state = table194[bytes[i]]; break; case State195: Authname.End = i; Final = true; goto exit1; case State196: DomainName.End = i; Final = true; goto exit1; case State197: Username.End = i; Final = true; goto exit1; case State198: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; state = table198[bytes[i]]; break; case State199: Authname.End = i; Final = true; goto exit1; case State200: DomainName.End = i; Final = true; goto exit1; case State201: Username.End = i; Final = true; goto exit1; case State202: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; state = table202[bytes[i]]; break; case State203: Authname.End = i; Final = true; goto exit1; case State204: DomainName.End = i; Final = true; goto exit1; case State205: Username.End = i; Final = true; goto exit1; case State206: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; state = table206[bytes[i]]; break; case State207: Authname.End = i; Final = true; goto exit1; case State208: DomainName.End = i; Final = true; goto exit1; case State209: Username.End = i; Final = true; goto exit1; case State210: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; state = table210[bytes[i]]; break; case State211: Authname.End = i; Final = true; goto exit1; case State212: DomainName.End = i; Final = true; goto exit1; case State213: Username.End = i; Final = true; goto exit1; case State214: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; state = table214[bytes[i]]; break; case State215: Authname.End = i; Final = true; goto exit1; case State216: DomainName.End = i; Final = true; goto exit1; case State217: Username.End = i; Final = true; goto exit1; case State218: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; state = table218[bytes[i]]; break; case State219: Authname.End = i; Final = true; goto exit1; case State220: DomainName.End = i; Final = true; goto exit1; case State221: Username.End = i; Final = true; goto exit1; case State222: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; state = table222[bytes[i]]; break; case State223: Authname.End = i; Final = true; goto exit1; case State224: DomainName.End = i; Final = true; goto exit1; case State225: Username.End = i; Final = true; goto exit1; case State226: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; state = table226[bytes[i]]; break; case State227: Authname.End = i; Final = true; goto exit1; case State228: DomainName.End = i; Final = true; goto exit1; case State229: Username.End = i; Final = true; goto exit1; case State230: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; state = table230[bytes[i]]; break; case State231: Authname.End = i; Final = true; goto exit1; case State232: DomainName.End = i; Final = true; goto exit1; case State233: Username.End = i; Final = true; goto exit1; case State234: Signature.End = i; Final = true; goto exit1; case State235: Authname.End = i; Final = true; goto exit1; case State236: DomainName.End = i; Final = true; goto exit1; case State237: Username.End = i; Final = true; goto exit1; case State238: Authname.End = i; Final = true; goto exit1; case State239: DomainName.End = i; Final = true; goto exit1; case State240: Username.End = i; Final = true; goto exit1; case State241: DomainName.End = i; Final = true; goto exit1; case State242: Username.End = i; Final = true; goto exit1; case State243: DomainName.End = i; Final = true; goto exit1; case State244: Username.End = i; Final = true; goto exit1; case State245: DomainName.End = i; Final = true; goto exit1; case State246: Username.End = i; Final = true; goto exit1; case State247: DomainName.End = i; Final = true; goto exit1; case State248: Username.End = i; Final = true; goto exit1; case State249: DomainName.End = i; Final = true; goto exit1; case State250: Username.End = i; Final = true; goto exit1; case State251: DomainName.End = i; Final = true; goto exit1; case State252: Username.End = i; Final = true; goto exit1; case State253: DomainName.End = i; Final = true; goto exit1; case State254: Username.End = i; Final = true; goto exit1; case State255: DomainName.End = i; Final = true; goto exit1; case State256: Username.End = i; Final = true; goto exit1; case State257: DomainName.End = i; Final = true; goto exit1; case State258: DomainName.End = i; Final = true; goto exit1; case State259: DomainName.End = i; Final = true; goto exit1; case State260: DomainName.End = i; Final = true; goto exit1; case State261: DomainName.End = i; Final = true; goto exit1; case State262: DomainName.End = i; Final = true; goto exit1; case State263: DomainName.End = i; Final = true; goto exit1; case State264: DomainName.End = i; Final = true; goto exit1; case State265: DomainName.End = i; Final = true; goto exit1; case State266: DomainName.End = i; Final = true; goto exit1; case State267: DomainName.End = i; Final = true; goto exit1; case State268: DomainName.End = i; Final = true; goto exit1; case State269: DomainName.End = i; Final = true; goto exit1; case State270: DomainName.End = i; Final = true; goto exit1; case State271: DomainName.End = i; Final = true; goto exit1; case State272: DomainName.End = i; Final = true; goto exit1; case State273: DomainName.End = i; Final = true; goto exit1; case State274: DomainName.End = i; Final = true; goto exit1; case State275: DomainName.End = i; Final = true; goto exit1; case State276: DomainName.End = i; Final = true; goto exit1; case State277: DomainName.End = i; Final = true; goto exit1; case State278: DomainName.End = i; Final = true; goto exit1; case State279: i--; Error = true; goto exit1; } } switch(state) { case State0: break; case State1: break; case State2: break; case State3: break; case State4: break; case State5: break; case State6: break; case State7: break; case State8: break; case State9: break; case State10: break; case State11: break; case State12: break; case State13: break; case State14: break; case State15: break; case State16: break; case State17: break; case State18: break; case State19: break; case State20: Final = true; BaseAction = BaseActions.Role; goto exit1; case State21: break; case State22: break; case State23: break; case State24: break; case State25: break; case State26: break; case State27: break; case State28: break; case State29: break; case State30: break; case State31: break; case State32: break; case State33: break; case State34: break; case State35: Final = true; BaseAction = BaseActions.Options; goto exit1; case State36: break; case State37: break; case State38: break; case State39: break; case State40: break; case State41: break; case State42: Final = true; BaseAction = BaseActions.Version; goto exit1; case State43: Final = true; BaseAction = BaseActions.Accounts; goto exit1; case State44: break; case State45: break; case State46: break; case State47: break; case State48: break; case State49: break; case State50: if(DomainName.Begin < 0)DomainName.Begin = i; break; case State51: break; case State52: break; case State53: if(Signature.Begin < 0)Signature.Begin = i; break; case State54: break; case State55: break; case State56: break; case State57: DomainName.End = i; Final = true; goto exit1; case State58: break; case State59: break; case State60: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; break; case State61: break; case State62: break; case State63: if(Authname.Begin < 0)Authname.Begin = i; break; case State64: DomainName.End = i; Final = true; goto exit1; case State65: break; case State66: break; case State67: break; case State68: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; break; case State69: break; case State70: Final = true; Timestamp = (Timestamp << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State71: Authname.End = i; Final = true; goto exit1; case State72: DomainName.End = i; Final = true; goto exit1; case State73: break; case State74: Final = true; Count = (Count << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State75: break; case State76: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; break; case State77: Final = true; StartIndex = (StartIndex << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State78: Final = true; Timestamp = (Timestamp << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State79: Authname.End = i; Final = true; goto exit1; case State80: DomainName.End = i; Final = true; goto exit1; case State81: break; case State82: Final = true; Count = (Count << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State83: break; case State84: break; case State85: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; break; case State86: Final = true; StartIndex = (StartIndex << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State87: Final = true; Timestamp = (Timestamp << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State88: Authname.End = i; Final = true; goto exit1; case State89: DomainName.End = i; Final = true; goto exit1; case State90: break; case State91: Final = true; Count = (Count << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State92: break; case State93: break; case State94: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; break; case State95: Final = true; StartIndex = (StartIndex << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State96: Final = true; Timestamp = (Timestamp << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State97: Authname.End = i; Final = true; goto exit1; case State98: DomainName.End = i; Final = true; goto exit1; case State99: break; case State100: Final = true; Count = (Count << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State101: break; case State102: Final = true; Method = Methods.Put; goto exit1; case State103: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; break; case State104: Final = true; StartIndex = (StartIndex << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State105: Final = true; Timestamp = (Timestamp << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State106: Authname.End = i; Final = true; goto exit1; case State107: DomainName.End = i; Final = true; goto exit1; case State108: Final = true; AccountAction = AccountActions.Userz; goto exit1; case State109: Final = true; Count = (Count << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State110: break; case State111: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; break; case State112: Final = true; StartIndex = (StartIndex << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State113: Final = true; Timestamp = (Timestamp << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State114: Authname.End = i; Final = true; goto exit1; case State115: DomainName.End = i; Final = true; goto exit1; case State116: if(UsersId.Begin < 0)UsersId.Begin = i; break; case State117: Final = true; Count = (Count << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State118: break; case State119: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; break; case State120: Final = true; StartIndex = (StartIndex << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State121: Final = true; Timestamp = (Timestamp << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State122: Authname.End = i; Final = true; goto exit1; case State123: DomainName.End = i; Final = true; goto exit1; case State124: UsersId.End = i; Final = true; goto exit1; case State125: Final = true; Count = (Count << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State126: Final = true; Method = Methods.Delete; goto exit1; case State127: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; break; case State128: Final = true; StartIndex = (StartIndex << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State129: Final = true; Timestamp = (Timestamp << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State130: Authname.End = i; Final = true; goto exit1; case State131: DomainName.End = i; Final = true; goto exit1; case State132: if(Username.Begin < 0)Username.Begin = i; break; case State133: UsersId.End = i; Final = true; goto exit1; case State134: Final = true; Count = (Count << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State135: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; break; case State136: Final = true; StartIndex = (StartIndex << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State137: Final = true; Timestamp = (Timestamp << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State138: Authname.End = i; Final = true; goto exit1; case State139: DomainName.End = i; Final = true; goto exit1; case State140: Username.End = i; Final = true; goto exit1; case State141: UsersId.End = i; Final = true; goto exit1; case State142: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; break; case State143: Final = true; Timestamp = (Timestamp << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State144: Authname.End = i; Final = true; goto exit1; case State145: DomainName.End = i; Final = true; goto exit1; case State146: Username.End = i; Final = true; goto exit1; case State147: UsersId.End = i; Final = true; goto exit1; case State148: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; break; case State149: Final = true; Timestamp = (Timestamp << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State150: Authname.End = i; Final = true; goto exit1; case State151: DomainName.End = i; Final = true; goto exit1; case State152: Username.End = i; Final = true; goto exit1; case State153: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; break; case State154: Final = true; Timestamp = (Timestamp << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State155: Authname.End = i; Final = true; goto exit1; case State156: DomainName.End = i; Final = true; goto exit1; case State157: Username.End = i; Final = true; goto exit1; case State158: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; break; case State159: Final = true; Timestamp = (Timestamp << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State160: Authname.End = i; Final = true; goto exit1; case State161: DomainName.End = i; Final = true; goto exit1; case State162: Username.End = i; Final = true; goto exit1; case State163: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; break; case State164: Final = true; Timestamp = (Timestamp << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State165: Authname.End = i; Final = true; goto exit1; case State166: DomainName.End = i; Final = true; goto exit1; case State167: Username.End = i; Final = true; goto exit1; case State168: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; break; case State169: Final = true; Timestamp = (Timestamp << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State170: Authname.End = i; Final = true; goto exit1; case State171: DomainName.End = i; Final = true; goto exit1; case State172: Username.End = i; Final = true; goto exit1; case State173: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; break; case State174: Final = true; Timestamp = (Timestamp << 1) * 5 + bytes[i - 1] - 48; goto exit1; case State175: Authname.End = i; Final = true; goto exit1; case State176: DomainName.End = i; Final = true; goto exit1; case State177: Username.End = i; Final = true; goto exit1; case State178: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; break; case State179: Authname.End = i; Final = true; goto exit1; case State180: DomainName.End = i; Final = true; goto exit1; case State181: Username.End = i; Final = true; goto exit1; case State182: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; break; case State183: Authname.End = i; Final = true; goto exit1; case State184: DomainName.End = i; Final = true; goto exit1; case State185: Username.End = i; Final = true; goto exit1; case State186: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; break; case State187: Authname.End = i; Final = true; goto exit1; case State188: DomainName.End = i; Final = true; goto exit1; case State189: Username.End = i; Final = true; goto exit1; case State190: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; break; case State191: Authname.End = i; Final = true; goto exit1; case State192: DomainName.End = i; Final = true; goto exit1; case State193: Username.End = i; Final = true; goto exit1; case State194: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; break; case State195: Authname.End = i; Final = true; goto exit1; case State196: DomainName.End = i; Final = true; goto exit1; case State197: Username.End = i; Final = true; goto exit1; case State198: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; break; case State199: Authname.End = i; Final = true; goto exit1; case State200: DomainName.End = i; Final = true; goto exit1; case State201: Username.End = i; Final = true; goto exit1; case State202: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; break; case State203: Authname.End = i; Final = true; goto exit1; case State204: DomainName.End = i; Final = true; goto exit1; case State205: Username.End = i; Final = true; goto exit1; case State206: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; break; case State207: Authname.End = i; Final = true; goto exit1; case State208: DomainName.End = i; Final = true; goto exit1; case State209: Username.End = i; Final = true; goto exit1; case State210: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; break; case State211: Authname.End = i; Final = true; goto exit1; case State212: DomainName.End = i; Final = true; goto exit1; case State213: Username.End = i; Final = true; goto exit1; case State214: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; break; case State215: Authname.End = i; Final = true; goto exit1; case State216: DomainName.End = i; Final = true; goto exit1; case State217: Username.End = i; Final = true; goto exit1; case State218: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; break; case State219: Authname.End = i; Final = true; goto exit1; case State220: DomainName.End = i; Final = true; goto exit1; case State221: Username.End = i; Final = true; goto exit1; case State222: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; break; case State223: Authname.End = i; Final = true; goto exit1; case State224: DomainName.End = i; Final = true; goto exit1; case State225: Username.End = i; Final = true; goto exit1; case State226: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; break; case State227: Authname.End = i; Final = true; goto exit1; case State228: DomainName.End = i; Final = true; goto exit1; case State229: Username.End = i; Final = true; goto exit1; case State230: if(Signature.Begin < 0)Signature.Begin = i; Signature.End = i; break; case State231: Authname.End = i; Final = true; goto exit1; case State232: DomainName.End = i; Final = true; goto exit1; case State233: Username.End = i; Final = true; goto exit1; case State234: Signature.End = i; Final = true; goto exit1; case State235: Authname.End = i; Final = true; goto exit1; case State236: DomainName.End = i; Final = true; goto exit1; case State237: Username.End = i; Final = true; goto exit1; case State238: Authname.End = i; Final = true; goto exit1; case State239: DomainName.End = i; Final = true; goto exit1; case State240: Username.End = i; Final = true; goto exit1; case State241: DomainName.End = i; Final = true; goto exit1; case State242: Username.End = i; Final = true; goto exit1; case State243: DomainName.End = i; Final = true; goto exit1; case State244: Username.End = i; Final = true; goto exit1; case State245: DomainName.End = i; Final = true; goto exit1; case State246: Username.End = i; Final = true; goto exit1; case State247: DomainName.End = i; Final = true; goto exit1; case State248: Username.End = i; Final = true; goto exit1; case State249: DomainName.End = i; Final = true; goto exit1; case State250: Username.End = i; Final = true; goto exit1; case State251: DomainName.End = i; Final = true; goto exit1; case State252: Username.End = i; Final = true; goto exit1; case State253: DomainName.End = i; Final = true; goto exit1; case State254: Username.End = i; Final = true; goto exit1; case State255: DomainName.End = i; Final = true; goto exit1; case State256: Username.End = i; Final = true; goto exit1; case State257: DomainName.End = i; Final = true; goto exit1; case State258: DomainName.End = i; Final = true; goto exit1; case State259: DomainName.End = i; Final = true; goto exit1; case State260: DomainName.End = i; Final = true; goto exit1; case State261: DomainName.End = i; Final = true; goto exit1; case State262: DomainName.End = i; Final = true; goto exit1; case State263: DomainName.End = i; Final = true; goto exit1; case State264: DomainName.End = i; Final = true; goto exit1; case State265: DomainName.End = i; Final = true; goto exit1; case State266: DomainName.End = i; Final = true; goto exit1; case State267: DomainName.End = i; Final = true; goto exit1; case State268: DomainName.End = i; Final = true; goto exit1; case State269: DomainName.End = i; Final = true; goto exit1; case State270: DomainName.End = i; Final = true; goto exit1; case State271: DomainName.End = i; Final = true; goto exit1; case State272: DomainName.End = i; Final = true; goto exit1; case State273: DomainName.End = i; Final = true; goto exit1; case State274: DomainName.End = i; Final = true; goto exit1; case State275: DomainName.End = i; Final = true; goto exit1; case State276: DomainName.End = i; Final = true; goto exit1; case State277: DomainName.End = i; Final = true; goto exit1; case State278: DomainName.End = i; Final = true; goto exit1; case State279: i--; Error = true; goto exit1; } exit1: ; OnAfterParse(); return i - offset; }
public ActionResult ExternalLogin(string provider, string returnUrl) { // Request a redirect to the external login provider return(AccountActions.ChallengeResult(provider, returnUrl, Url)); }
/// <summary> /// Creates the register form with all the components /// This section also adds the register button and its functionality /// </summary> private void CreateTheRegisterForm() { Form form = new Form() { Width = 300, Height = 350, BackColor = Color.WhiteSmoke, StartPosition = FormStartPosition.CenterScreen }; Label mainText = new Label() { Left = 105, Top = 10, Text = "Register Account", Font = new Font("Arial", 11, FontStyle.Bold) }; Label registerText = new Label() { Left = 10, Top = 40, Text = "User", Font = new Font("Arial", 11, FontStyle.Bold), TextAlign = ContentAlignment.MiddleLeft }; TextBox registerInput = new TextBox() { Left = 10, Top = 70, Font = new Font("Arial", 9), Width = 120, MaxLength = 15 }; Label passText = new Label() { Left = 10, Top = 100, Text = "Password", Font = new Font("Arial", 11, FontStyle.Bold), TextAlign = ContentAlignment.MiddleLeft }; TextBox passInput = new TextBox() { Left = 10, Top = 130, Font = new Font("Arial", 9), Width = 120, PasswordChar = '*' }; Label confirmText = new Label() { Left = 10, Top = 160, Text = "Confirm Password", Font = new Font("Arial", 11, FontStyle.Bold), TextAlign = ContentAlignment.MiddleLeft, Width = 150 }; TextBox confirmInput = new TextBox() { Left = 10, Top = 190, Font = new Font("Arial", 9), Width = 120, PasswordChar = '*' }; Button regButton = new Button { Font = new Font("Arial", 11, FontStyle.Bold), Text = "Register", Dock = DockStyle.Bottom, Height = 40 }; Button cancelButon = new Button { Font = new Font("Arial", 11, FontStyle.Bold), Text = "Cancel", Dock = DockStyle.Bottom, Height = 40, DialogResult = DialogResult.Cancel }; regButton.Click += async(obj, e) => { if (VerifyPassInput(passInput.Text, confirmInput.Text, registerInput.Text)) { var salt = PasswordActions.GenerateSalt(); var reg = await AccountActions.RegisterAccount(new List <string> { $"user={registerInput.Text}", $"password={passInput.Text}", $"salt={salt}" }); if (reg) { MessageBox.Show("Your account was created"); form.Close(); } else { MessageBox.Show("Something went wrong, please try again later"); } } else { MessageBox.Show("Something doesn't seem right here. Make sure the fields are not empty and that the passwords match"); } }; form.Controls.Add(mainText); form.Controls.Add(registerText); form.Controls.Add(registerInput); form.Controls.Add(passText); form.Controls.Add(passInput); form.Controls.Add(confirmText); form.Controls.Add(confirmInput); form.Controls.Add(regButton); form.Controls.Add(cancelButon); form.ShowDialog(); }
public AccountsViewModel() { actions = new AccountActions(); }
/// <summary> /// Creates the login form with all the components /// This section also adds the login button and its functionality /// </summary> private void CreateLoginForm() { Form form = new Form() { Width = 300, Height = 275, BackColor = Color.WhiteSmoke, StartPosition = FormStartPosition.CenterScreen }; Label mainText = new Label() { Left = 125, Top = 10, Text = "Login", Font = new Font("Arial", 11, FontStyle.Bold) }; Label loginText = new Label() { Left = 10, Top = 40, Text = "User", Font = new Font("Arial", 11, FontStyle.Bold), TextAlign = ContentAlignment.MiddleLeft }; TextBox loginInput = new TextBox() { Left = 10, Top = 70, Font = new Font("Arial", 9), Width = 120, MaxLength = 15 }; Label passText = new Label() { Left = 10, Top = 100, Text = "Password", Font = new Font("Arial", 11, FontStyle.Bold), TextAlign = ContentAlignment.MiddleLeft }; TextBox passInput = new TextBox() { Left = 10, Top = 130, Font = new Font("Arial", 9), Width = 120, PasswordChar = '*' }; Button logButton = new Button { Font = new Font("Arial", 11, FontStyle.Bold), Text = "Login", Dock = DockStyle.Bottom, Height = 40 }; Button cancelButon = new Button { Font = new Font("Arial", 11, FontStyle.Bold), Text = "Cancel", Dock = DockStyle.Bottom, Height = 40, DialogResult = DialogResult.Cancel }; cancelButon.Click += (o, e) => { form.Close(); }; logButton.Click += async(o, e) => { if (VerifyEmptyLogin(loginInput.Text, passInput.Text)) { var logResult = await AccountActions.Login(new List <string> { $"user={loginInput.Text}", $"password={passInput.Text}" }); if (logResult) { MessageBox.Show("Welcome Back"); form.Close(); } else { MessageBox.Show("User or password is incorrect"); } } else { MessageBox.Show("Something is not right here, make sure all fields are filled"); } }; form.Controls.Add(mainText); form.Controls.Add(loginText); form.Controls.Add(loginInput); form.Controls.Add(passText); form.Controls.Add(passInput); form.Controls.Add(logButton); form.Controls.Add(cancelButon); form.ShowDialog(); }
public AccountsViewModel(account cont) { _cont = cont; actions = new AccountActions(); }
public System.Threading.Tasks.Task <verifyAuthorizedSignaturesResponse> verifyAuthorizedSignaturesAsync(string arg0, SignatureData[] arg1, byte[] arg2, AccountActions arg3) { verifyAuthorizedSignaturesRequest inValue = new verifyAuthorizedSignaturesRequest(); inValue.arg0 = arg0; inValue.arg1 = arg1; inValue.arg2 = arg2; inValue.arg3 = arg3; return(((AuthorityPort)(this)).verifyAuthorizedSignaturesAsync(inValue)); }
public System.Threading.Tasks.Task <testNewSignerResponse> testNewSignerAsync(string arg0, Person[] arg1, string arg2, AccountActions arg3) { testNewSignerRequest inValue = new testNewSignerRequest(); inValue.arg0 = arg0; inValue.arg1 = arg1; inValue.arg2 = arg2; inValue.arg3 = arg3; return(((AuthorityPort)(this)).testNewSignerAsync(inValue)); }
///Authentication check private static void ProcessAuthenticate(Session MySession, List <byte> myPacket, bool CreateMasterSession) { if (!CreateMasterSession) { Logger.Info("Processing Authentication (Server Select)"); } else { Logger.Info("Processing Authentication (Character Select)"); } ///Opcode option? Just remove for now myPacket.RemoveRange(0, 1); ///Unknown also, supposedly can be 03 00 00 00 or 01 00 00 00 myPacket.RemoveRange(0, 4); ///Game Code Length int GameCodeLength = myPacket[3] << 24 | myPacket[2] << 16 | myPacket[1] << 8 | myPacket[0]; myPacket.RemoveRange(0, 4); ///Our Game Code String byte[] GameCodeArray = new byte[GameCodeLength]; ///Copy The GameCode into other variable myPacket.CopyTo(0, GameCodeArray, 0, GameCodeLength); ///Remove GameCode from packet myPacket.RemoveRange(0, GameCodeLength); ///the actual gamecode string GameCode = Encoding.Default.GetString(GameCodeArray); if (GameCode == "EQOA") { ///Authenticate Logger.Info("Received EQOA Game Code, continuing..."); ///Grab Character name ///Game Code Length int AccountNameLength = myPacket[3] << 24 | myPacket[2] << 16 | myPacket[1] << 8 | myPacket[0]; myPacket.RemoveRange(0, 4); ///Our CharacterName Array byte[] AccountNameArray = new byte[AccountNameLength]; ///Copy The characterName into other variable myPacket.CopyTo(0, AccountNameArray, 0, AccountNameLength); ///Remove characterName from packet myPacket.RemoveRange(0, AccountNameLength); ///the actual gamecode string AccountName = Encoding.Default.GetString(AccountNameArray); Logger.Info($"Received Account Name: {AccountName}"); ///Username ends with 01, no known use, remove for now myPacket.RemoveRange(0, 1); //Decrypting password information goes here? string Password = "******"; ///Remove encrypted password off packet myPacket.RemoveRange(0, 32); ///Uncomment once ready MySession.AccountID = AccountActions.VerifyPassword(AccountName, Password); ///Theoretically we want to verify account # is not 0 here, if it is, drop it. if (MySession.AccountID == 0) { ///This work? ///Just ignore the packet and let client resend. ///Something noteable went wrong here most likely return; } } else { ///If not EQOA.... drop? Logger.Err("Did not receive EQOA Game Code, not continuing..."); ///Should we attempt to disconnect the session here? } }