private String DecodePListFile(String inFile) { String plist = null; try { plist = CFPropertyList.PropertyListToXML(ReadFile(inFile)); } catch (Exception err) { plist = ReadTextFile(inFile, 1024); } return(plist); }
private String DecodePListData(Byte[] inData) { String plist = null; Boolean decodeFailed = false; try { plist = CFPropertyList.PropertyListToXML(inData); if (plist == null) { decodeFailed = true; } } catch (Exception err) { decodeFailed = true; Console.WriteLine(err.Message); } if (decodeFailed) { plist = System.Text.Encoding.ASCII.GetString(inData); } return(plist); }