Beispiel #1
0
 public static void SetName(this HueObject obj, string newName)
 {
     if (newName == null)
     {
         return;
     }
     if (!obj.HasProperty("name"))
     {
         return;
     }
     obj.GetType().GetProperty("name").SetValue(obj, newName);
 }
Beispiel #2
0
 public static string GetName(this HueObject obj)
 {
     return(obj.HasProperty("name") ? obj.GetType().GetProperty("name").GetValue(obj).ToString() : "Unknown");
 }