Ejemplo n.º 1
0
 public static Projects CreateProjects(int numberSuccess, int numberFailure)
 {
     var projects = new Projects { Project = new Project[numberSuccess + numberFailure] };
     MakeSuccessProjects(numberSuccess).CopyTo(projects.Project, 0);
     MakeFailureProjects(numberFailure).CopyTo(projects.Project, numberSuccess );
     return projects;
 }
Ejemplo n.º 2
0
 public static string MakeXml(Projects projects)
 {
     var serializer = new XmlSerializer(typeof(Projects));
     XmlSerializerNamespaces ns = new XmlSerializerNamespaces();
     ns.Add(String.Empty, String.Empty);
     string utf8;
     using (StringWriter writer = new Utf8StringWriter())
     {
         serializer.Serialize(writer, projects,ns);
         utf8 = writer.ToString();
     }
     return utf8;
 }