public static void LoadServices(string fromDirectory) { ServiceList = new Dictionary<string, Service>(); string[] fileList = Directory.GetFiles(fromDirectory, "*.xml"); foreach (string file in fileList) { Service tempService = new Service(file); ServiceList.Add(tempService.ServiceConfig["GUID"], tempService); } }
protected void LstFilesSelectedIndexChanged(object sender, EventArgs e) { string fileName = lstFiles.SelectedItem.Text; Service tempService = new Service(fileName); }