public Address(int index, ReferenceDepthContext context) { Address sourceAddress = DataSource.Address[index]; this.StreetAddress = sourceAddress.StreetAddress; this.City = sourceAddress.City; this.State = sourceAddress.State; this.ZipCode = sourceAddress.ZipCode; }
public Person(int index, ReferenceDepthContext context) { this.Age = index + 20; this.Address = new Address(index, context); this.Alias = new string[] { "Alias" + index }; this.FirstName = DataSource.Names[index]; this.Gender = Gender.Male; this.HomeNumber = DataSource.HomePhoneNumbers[index]; this.UnserializableSSN = DataSource.SSN[index]; this.FavoriteHobby = new HobbyActivity("Xbox Gaming"); }
public Employee(int index, ReferenceDepthContext context) : base(index, context) { this.EmployeeId = index; this.WorkItem = new WorkItem() { EmployeeID = index, IsCompleted = false, NumberOfHours = ((index + 100) / 6), WorkItemID = index + 25 }; this.Manager = (Employee)TypeInitializer.InternalGetInstance(SupportedTypes.Employee, (index + 1) % (DataSource.MaxIndex + 1), context); this.DirectReports = new System.Collections.Generic.List<Employee>(); Employee directEmployee = (Employee)TypeInitializer.InternalGetInstance(SupportedTypes.Employee, (index + 2) % (DataSource.MaxIndex + 1), context); if (directEmployee != null) { this.DirectReports.Add(directEmployee); } }
public Employee(int index, ReferenceDepthContext context) : base(index, context) { this.EmployeeId = index; this.WorkItem = new WorkItem() { EmployeeID = index, IsCompleted = false, NumberOfHours = ((index + 100) / 6), WorkItemID = index + 25 }; this.Manager = (Employee)TypeInitializer.InternalGetInstance(SupportedTypes.Employee, (index + 1) % (DataSource.MaxIndex + 1), context); this.DirectReports = new System.Collections.Generic.List <Employee>(); Employee directEmployee = (Employee)TypeInitializer.InternalGetInstance(SupportedTypes.Employee, (index + 2) % (DataSource.MaxIndex + 1), context); if (directEmployee != null) { this.DirectReports.Add(directEmployee); } }
public MultipleKeyEmployee(int index, ReferenceDepthContext context) : base(index, context) { this.EmployeeGuid = new Guid("844080c0-2f9e-472e-8c72-1a8ecd9f9037"); this.UniqueStringId = DataSource.Names[index] + index; }