Example #1
0
        public static NanoleafConnectionInfo ConvertFromFile(string path)
        {
            NanoleafConnectionInfo nCI = new NanoleafConnectionInfo();

            if (File.Exists(path))
            {
                string fileContent = File.ReadAllText(path);
                nCI = JsonConvert.DeserializeObject <NanoleafConnectionInfo>(fileContent);
            }
            return(nCI);
        }
Example #2
0
 public ConnectionDocument(NanoleafConnectionInfo information)
 {
     _fileContent = JsonConvert.SerializeObject(information);
     _path        = new FileInfo().GetFilePath();
 }