Exemplo n.º 1
0
        /// <summary>
        /// Creates a per-file log entry for the given date.
        /// </summary>
        /// <param name="date">The date for which the log entry should be created.</param>
        public PerFileLogEntry(DateTime date)
        {
            var random = new Random();

            this.Date           = date.Date;
            this.Region         = DataGeneration.GetRegion();
            this.TenantName     = new Bogus.DataSets.Company().CompanyName();
            this.FileName       = new Bogus.DataSets.System().FileName();
            this.ModifyingUsers = GenerateUsersString();
            this.FirstAccess    = this.Date.AddHours(random.Next(0, 6))
                                  .AddMinutes(random.Next(0, 59))
                                  .AddSeconds(random.Next(0, 59));
            this.LastAccess = this.Date.AddHours(random.Next(18, 23))
                              .AddMinutes(random.Next(0, 59))
                              .AddSeconds(random.Next(0, 59));
        }