Exemplo n.º 1
0
        public SystemWideLogEntry(DateTime date, FileAccessStatus status)
        {
            DateTimeOfAccess = date.Date.ToString("dd.MM.yyyy", CultureInfo.InvariantCulture);
            Region           = DataGeneration.GetRandomRegion();
            TenantName       = faker.Person.FirstName;
            UserName         = faker.Person.UserName;
            FileName         = faker.System.FileName("tsv");
            Status           = status;

            if (status == FileAccessStatus.Error)
            {
                Exception = faker.System.Exception().GetType().ToString();
            }
        }
Exemplo n.º 2
0
        public PerFileLogEntry(DateTime date)
        {
            var random = new Random();

            Date           = date.Date;
            Region         = DataGeneration.GetRandomRegion();
            TenantName     = FakeCompanies.CompanyName();
            FileName       = FakeSystem.FileName();
            ModifyingUsers = GenerateUsersString();
            FirstAccess    = Date.AddHours(random.Next(0, 6))
                             .AddMinutes(random.Next(0, 59))
                             .AddSeconds(random.Next(0, 59));
            LastAccess = Date.AddHours(random.Next(11, 23))
                         .AddMinutes(random.Next(0, 59))
                         .AddSeconds(random.Next(0, 59));
        }