Пример #1
0
 public static void SerializeToStream(UserXml userXml, Stream stream)
 {
     new XmlSerializer(typeof (UserXml)).Serialize(stream, userXml);
 }
Пример #2
0
 public static UserXml InitializeRepositories(IEnumerable<Repository> repositories)
 {
     var user = new UserXml();
     user.Repositories = repositories.Select(repository => new RepositoryXml(repository)).ToArray();
     return user;
 }