public override void Update()
 {
     try
     {
         Dictionary <string, object> strs = (Dictionary <string, object>)Plist.readPlist(this.FilePath);
         bool flag = false;
         if (!string.IsNullOrWhiteSpace(this.mVersionOne))
         {
             strs["CFBundleShortVersionString"] = this.mVersionOne;
             flag = true;
         }
         if (!string.IsNullOrWhiteSpace(this.mVersionTwo))
         {
             strs["CFBundleVersion"] = this.mVersionTwo;
             flag = true;
         }
         if (flag)
         {
             Plist.writeXml(strs, this.FilePath);
         }
     }
     catch
     {
     }
 }
示例#2
0
        public static object readPlist(string path)
        {
            object obj;

            using (FileStream fileStream = new FileStream(path, FileMode.Open, FileAccess.Read))
            {
                obj = Plist.readPlist(fileStream, plistType.Auto);
            }
            return(obj);
        }
        public string GetVersion(string Key)
        {
            string str;

            try
            {
                str = ((Dictionary <string, object>)Plist.readPlist(this.FilePath))[Key].ToString();
            }
            catch
            {
                str = string.Empty;
            }
            return(str);
        }
示例#4
0
 public static object readPlistSource(string source)
 {
     return(Plist.readPlist(Encoding.UTF8.GetBytes(source)));
 }
示例#5
0
 public static object readPlist(byte[] data)
 {
     return(Plist.readPlist(new MemoryStream(data), plistType.Auto));
 }