static void Main(string[] args) { var dateTime = DateTime.Now; var str = EasyInviteCode.Generate("milkitic", dateTime); var success = EasyInviteCode.ConvertBack(str); var connectRegex = new ConnectRegexObj(); connectRegex.Match( "L 07/19/2020 - 17:48:37: \"CPU 0<1774><STEAM_1:0:138017978><>\" connected, address \"112.64.0.74:6785\""); }
protected override void OnModelCreating(ModelBuilder modelBuilder) { base.OnModelCreating(modelBuilder); modelBuilder.Entity <User>().HasData(new User { Id = 1, Password = UserService.GetSaltedPass("r00t@bst123"), Username = "******", Role = UserRoles.Root, InviteCodes = string.Join('|', EasyInviteCode.Generate("root", DateTime.Now.AddDays(7))) }); }