public bool SetDataRoot(global::System.Object newDataRoot)
 {
     this.bindingsTracking.ReleaseAllListeners();
     if (newDataRoot != null)
     {
         this.dataRoot = (global::SDKTemplate.BluetoothLEDeviceDisplay)newDataRoot;
         return(true);
     }
     return(false);
 }
 // Update methods for each path node used in binding steps.
 private void Update_(global::SDKTemplate.BluetoothLEDeviceDisplay obj, int phase)
 {
     this.bindingsTracking.UpdateChildListeners_(obj);
     if (obj != null)
     {
         if ((phase & (NOT_PHASED | DATA_CHANGED | (1 << 0))) != 0)
         {
             this.Update_GlyphBitmapImage(obj.GlyphBitmapImage, phase);
             this.Update_IsPaired(obj.IsPaired, phase);
             this.Update_IsConnected(obj.IsConnected, phase);
             this.Update_Name(obj.Name, phase);
         }
     }
 }
 public void UpdateChildListeners_ResultsListView_SelectedItem_Cast_SelectedItem_To_BluetoothLEDeviceDisplay(global::SDKTemplate.BluetoothLEDeviceDisplay obj)
 {
     if (obj != cache_ResultsListView_SelectedItem_Cast_SelectedItem_To_BluetoothLEDeviceDisplay)
     {
         if (cache_ResultsListView_SelectedItem_Cast_SelectedItem_To_BluetoothLEDeviceDisplay != null)
         {
             ((global::System.ComponentModel.INotifyPropertyChanged)cache_ResultsListView_SelectedItem_Cast_SelectedItem_To_BluetoothLEDeviceDisplay).PropertyChanged -= PropertyChanged_ResultsListView_SelectedItem_Cast_SelectedItem_To_BluetoothLEDeviceDisplay;
             cache_ResultsListView_SelectedItem_Cast_SelectedItem_To_BluetoothLEDeviceDisplay = null;
         }
         if (obj != null)
         {
             cache_ResultsListView_SelectedItem_Cast_SelectedItem_To_BluetoothLEDeviceDisplay = obj;
             ((global::System.ComponentModel.INotifyPropertyChanged)obj).PropertyChanged     += PropertyChanged_ResultsListView_SelectedItem_Cast_SelectedItem_To_BluetoothLEDeviceDisplay;
         }
     }
 }
                public void UpdateChildListeners_(global::SDKTemplate.BluetoothLEDeviceDisplay obj)
                {
                    Scenario1_DiscoverServer_obj2_Bindings bindings = TryGetBindingObject();

                    if (bindings != null)
                    {
                        if (bindings.dataRoot != null)
                        {
                            ((global::System.ComponentModel.INotifyPropertyChanged)bindings.dataRoot).PropertyChanged -= PropertyChanged_;
                        }
                        if (obj != null)
                        {
                            bindings.dataRoot = obj;
                            ((global::System.ComponentModel.INotifyPropertyChanged)obj).PropertyChanged += PropertyChanged_;
                        }
                    }
                }
                public void PropertyChanged_ResultsListView_SelectedItem_Cast_SelectedItem_To_BluetoothLEDeviceDisplay(object sender, global::System.ComponentModel.PropertyChangedEventArgs e)
                {
                    Scenario1_Discovery_obj1_Bindings bindings = TryGetBindingObject();

                    if (bindings != null)
                    {
                        string propName = e.PropertyName;
                        global::SDKTemplate.BluetoothLEDeviceDisplay obj = sender as global::SDKTemplate.BluetoothLEDeviceDisplay;
                        if (global::System.String.IsNullOrEmpty(propName))
                        {
                            if (obj != null)
                            {
                                bindings.Update_ResultsListView_SelectedItem_Cast_SelectedItem_To_BluetoothLEDeviceDisplay_IsPaired(obj.IsPaired, DATA_CHANGED);
                            }
                            else
                            {
                                bindings.UpdateFallback_ResultsListView_SelectedItem_Cast_SelectedItem_To_BluetoothLEDeviceDisplay_IsPaired(DATA_CHANGED);
                            }
                        }
                        else
                        {
                            switch (propName)
                            {
                            case "IsPaired":
                            {
                                if (obj != null)
                                {
                                    bindings.Update_ResultsListView_SelectedItem_Cast_SelectedItem_To_BluetoothLEDeviceDisplay_IsPaired(obj.IsPaired, DATA_CHANGED);
                                }
                                else
                                {
                                    bindings.UpdateFallback_ResultsListView_SelectedItem_Cast_SelectedItem_To_BluetoothLEDeviceDisplay_IsPaired(DATA_CHANGED);
                                }
                                break;
                            }

                            default:
                                break;
                            }
                        }
                        bindings.CompleteUpdate(DATA_CHANGED);
                    }
                }
 private void Update_ResultsListView_SelectedItem_Cast_SelectedItem_To_BluetoothLEDeviceDisplay(global::SDKTemplate.BluetoothLEDeviceDisplay obj, int phase)
 {
     this.bindingsTracking.UpdateChildListeners_ResultsListView_SelectedItem_Cast_SelectedItem_To_BluetoothLEDeviceDisplay(obj);
     if (obj != null)
     {
         if ((phase & (NOT_PHASED | DATA_CHANGED | (1 << 0))) != 0)
         {
             this.Update_ResultsListView_SelectedItem_Cast_SelectedItem_To_BluetoothLEDeviceDisplay_IsPaired(obj.IsPaired, phase);
         }
     }
     else
     {
         if ((phase & (NOT_PHASED | DATA_CHANGED | (1 << 0))) != 0)
         {
             this.UpdateFallback_ResultsListView_SelectedItem_Cast_SelectedItem_To_BluetoothLEDeviceDisplay_IsPaired(phase);
         }
     }
 }
                public void PropertyChanged_(object sender, global::System.ComponentModel.PropertyChangedEventArgs e)
                {
                    Scenario1_DiscoverServer_obj2_Bindings bindings = TryGetBindingObject();

                    if (bindings != null)
                    {
                        string propName = e.PropertyName;
                        global::SDKTemplate.BluetoothLEDeviceDisplay obj = sender as global::SDKTemplate.BluetoothLEDeviceDisplay;
                        if (global::System.String.IsNullOrEmpty(propName))
                        {
                            if (obj != null)
                            {
                                bindings.Update_GlyphBitmapImage(obj.GlyphBitmapImage, DATA_CHANGED);
                                bindings.Update_IsPaired(obj.IsPaired, DATA_CHANGED);
                                bindings.Update_IsConnected(obj.IsConnected, DATA_CHANGED);
                                bindings.Update_Name(obj.Name, DATA_CHANGED);
                            }
                        }
                        else
                        {
                            switch (propName)
                            {
                            case "GlyphBitmapImage":
                            {
                                if (obj != null)
                                {
                                    bindings.Update_GlyphBitmapImage(obj.GlyphBitmapImage, DATA_CHANGED);
                                }
                                break;
                            }

                            case "IsPaired":
                            {
                                if (obj != null)
                                {
                                    bindings.Update_IsPaired(obj.IsPaired, DATA_CHANGED);
                                }
                                break;
                            }

                            case "IsConnected":
                            {
                                if (obj != null)
                                {
                                    bindings.Update_IsConnected(obj.IsConnected, DATA_CHANGED);
                                }
                                break;
                            }

                            case "Name":
                            {
                                if (obj != null)
                                {
                                    bindings.Update_Name(obj.Name, DATA_CHANGED);
                                }
                                break;
                            }

                            default:
                                break;
                            }
                        }
                    }
                }
 private bool TryGet_ResultsListView_SelectedItem_Cast_SelectedItem_To_BluetoothLEDeviceDisplay(out global::SDKTemplate.BluetoothLEDeviceDisplay val)
 {
     global::System.Object obj;
     if (TryGet_ResultsListView_SelectedItem(out obj) && obj != null)
     {
         val = (global::SDKTemplate.BluetoothLEDeviceDisplay)obj;
         return(true);
     }
     else
     {
         val = default(global::SDKTemplate.BluetoothLEDeviceDisplay);
         return(false);
     }
 }