public static TfsConnectionViewModel ToViewModel(this TfsKnownConnections knownConnections)
        {
            var vm = new TfsConnectionViewModel
            {
                Connections = knownConnections
                              .Connections?
                              .Select(c => c.ToViewModel())
                              .ToList()
            };

            return(vm);
        }
 public static bool Any(this TfsKnownConnections connections)
 {
     return(connections?.Connections != null && connections.Connections.Any());
 }
 private static async Task SaveConnections(string filename, TfsKnownConnections connections)
 {
     var json = JsonConvert.SerializeObject(connections, Formatting.Indented);
     await File.WriteAllTextAsync(filename, json);
 }