Пример #1
0
 public static CrossLinker[] ReadCrossLinkList()
 {
     string filename = Path.Combine(FileUtils.GetConfigPath(), "crosslinks.xml");
     if (!File.Exists(filename))
     {
         return new CrossLinker[0];
     }
     CrossLinkerList cllist = (CrossLinkerList)XmlSerialization.DeserializeObject(filename, typeof(CrossLinkerList));
     CrossLinker[] clArr = cllist != null ? cllist.Crosslinks : new CrossLinker[0];
     for (int i = 0; i < clArr.Length; i++)
     {
         clArr[i].Index = (ushort)i;
     }
     return clArr;
 }
Пример #2
0
        public static CrossLinker[] ReadCrossLinkList()
        {
            string filename = Path.Combine(FileUtils.GetConfigPath(), "crosslinks.xml");

            if (!File.Exists(filename))
            {
                return(new CrossLinker[0]);
            }
            CrossLinkerList prot = (CrossLinkerList)XmlSerialization.DeserializeObject(filename, typeof(CrossLinkerList));

            CrossLinker[] result = prot != null ? prot.Crosslinks : new CrossLinker[0];
            for (int i = 0; i < result.Length; i++)
            {
                result[i].Index = (ushort)i;
            }
            return(result);
        }