Exemplo n.º 1
0
        public static EmployeeDTO CreateEmployee()
        {
            var e = new EmployeeDTO();
            e.EmployeeId = 1;
            e.Name = "Cartman";
            e.ActiveProjects = new List<ProjectDTO>();
            var proj1 = new ProjectDTO();
            proj1.ProjectId = 1;
            proj1.ProjectName = "Southfield";
            var proj2 = new ProjectDTO();
            proj2.ProjectId = 2;
            proj2.ProjectName = "Resurrect Kenny";
            e.ActiveProjects.Add(proj2);
            e.Reportees = new[] { 2, 3 };
            e.RawBytes = new byte[] { 0x00, 0x01, 0x02, 0x03 };
            e.Notes = "Quite the animated character";
            e.StillWorksHere = true;

            return e;
        }
Exemplo n.º 2
0
 public override string TransformName(EmployeeDTO employee)
 {
     char[] charArray = employee.Name.ToCharArray();
     Array.Reverse( charArray );
     return new string( charArray );
 }