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;
 }
Ejemplo n.º 3
0
 public void UpdateDiscoveryProperties(BBDiscoveryProperties theModel)
 {
     Discovery.UpdateProperties(theModel);
 }