public void UpdateProperties(BBDiscoveryProperties theModel) { bool SubscriptionsChangedFlag = false; bool EventsChangedFlag = false; if (theModel.DiscoverySubscription != null) { if (Properties.DiscoverySubscription.Id != theModel.DiscoverySubscription.Id) { SubscriptionsChangedFlag = true; Properties.DiscoverySubscription.Id = theModel.DiscoverySubscription.Id; } } if (theModel.StartDeviceDiscovery != null) { if (Properties.StartDeviceDiscovery.Id != theModel.StartDeviceDiscovery.Id) { EventsChangedFlag = true; Properties.StartDeviceDiscovery.Id = theModel.StartDeviceDiscovery.Id; } if (Properties.StartDeviceDiscovery.Description != theModel.StartDeviceDiscovery.Description) { EventsChangedFlag = true; Properties.StartDeviceDiscovery.Description = theModel.StartDeviceDiscovery.Description; } } if (EventsChangedFlag && EventsChanged != null) { EventsChanged(null, null); } if (SubscriptionsChangedFlag && SubscriptionsChanged != null) { SubscriptionsChanged(null, null); } }
public BBDiscovery(BBDiscoveryProperties theModel) { Properties = theModel; Properties.DiscoverySubscription.EventConsumer = this; }
public void UpdateDiscoveryProperties(BBDiscoveryProperties theModel) { Discovery.UpdateProperties(theModel); }