Inheritance: BaseTeamFoundationServer, IAuthServer
        public static BaseTeamFoundationServer Create(XElement element, string password, bool isPasswordSavedInXml)
        {
            var type = element.Attribute("Type");

            if (type == null || (ServerType)Convert.ToInt32(type.Value) == ServerType.TFS)
            {
                return(TeamFoundationServer.FromLocalXml(element, password, isPasswordSavedInXml));
            }
            else
            {
                return(VisualStudioOnlineTFS.FromLocalXml(element, password, isPasswordSavedInXml));
            }
        }
 public static VisualStudioOnlineTFS FromLocalXml(XElement element, string password, bool isPasswordSavedInXml)
 {
     try
     {
         var server = new VisualStudioOnlineTFS(new Uri(element.Attribute("Url").Value),
                                                element.Attribute("Name").Value,
                                                element.Attribute("UserName").Value,
                                                element.Attribute("AuthUserName").Value,
                                                password,
                                                isPasswordSavedInXml);
         server.ProjectCollections = element.Elements("ProjectCollection").Select(x => ProjectCollection.FromLocalXml(server, x)).ToList();
         return(server);
     }
     catch
     {
         return(null);
     }
 }
 public static VisualStudioOnlineTFS FromLocalXml(XElement element, string password, bool isPasswordSavedInXml)
 {
     try
     {
         var server = new VisualStudioOnlineTFS(new Uri(element.Attribute("Url").Value),
                                                element.Attribute("Name").Value,
                                                element.Attribute("UserName").Value,
                                                element.Attribute("AuthUserName").Value,
                                                password,
                                                isPasswordSavedInXml);
         server.ProjectCollections = element.Elements("ProjectCollection").Select(x => ProjectCollection.FromLocalXml(server, x)).ToList();
         return server;
     }
     catch
     {
         return null;
     }
 }