private NameValueCollection GetAssemblyEventMapping(Assembly assembly, Hl7Package package) { NameValueCollection structures = new NameValueCollection(); using (Stream inResource = assembly.GetManifestResourceStream(package.EventMappingResourceName)) { if (inResource != null) { using (StreamReader sr = new StreamReader(inResource)) { string line = sr.ReadLine(); while (line != null) { if ((line.Length > 0) && ('#' != line[0])) { string[] lineElements = line.Split(' ', '\t'); structures.Add(lineElements[0], lineElements[1]); } line = sr.ReadLine(); } } } } return(structures); }
private System.Collections.Specialized.NameValueCollection GetAssemblyEventMapping(System.Reflection.Assembly assembly, Hl7Package package) { System.Collections.Specialized.NameValueCollection structures = new System.Collections.Specialized.NameValueCollection(); using (System.IO.Stream inResource = assembly.GetManifestResourceStream(package.EventMappingResourceName)) { if (inResource != null) { using (System.IO.StreamReader sr = new System.IO.StreamReader(inResource)) { string line = sr.ReadLine(); while (line != null) { if ((line.Length > 0) && ('#' != line[0])) { string[] lineElements = line.Split(' ', '\t'); structures.Add(lineElements[0], lineElements[1]); } line = sr.ReadLine(); } } } } return structures; }
private static string RemoveTrailingDot(Hl7Package package) { string assemblyString = package.PackageName; char lastChar = assemblyString.LastOrDefault(); bool trailingDot = lastChar != default(char) && lastChar.ToString() == "."; if (trailingDot) { assemblyString = assemblyString.Substring(0, assemblyString.Length - 1); } return assemblyString; }
private static string RemoveTrailingDot(Hl7Package package) { string assemblyString = package.PackageName; char lastChar = assemblyString.LastOrDefault(); bool trailingDot = lastChar != default(char) && lastChar.ToString() == "."; if (trailingDot) { assemblyString = assemblyString.Substring(0, assemblyString.Length - 1); } return(assemblyString); }
private static void AddPackage(Hashtable packages, Hl7Package package) { if (packages[package.Version] == null) packages[package.Version] = new List<string>(); List<string> versions = (List<string>) packages[package.Version]; versions.Add(package.PackageName); }