Beispiel #1
0
        public Description Describe(Component.IEntity device)
        {
            string path = string.Format("/{0}/{1}", device.Identity.ToString(), device.Description.BusName());

            // TODO: Reimplement the following code

            /*
             * IEnumerable<Facet> facets = device.Actionables.Select(
             *  actionable =>
             *  {
             *      string name = string.Format("{0}-{1}-{2}", device.Description.Manufacturer, device.Description.Model, actionable.Identity.ToString());
             *
             *      IEnumerable<MethodHandler> methodHandlers = actionable.Actions.Select(action => new MethodHandler(action.Name, (member, message) => _eventAggregator.Publish(action.Command))).ToArray();
             *
             *      return new Facet(name, methodHandlers);
             *  }
             * ).ToArray();
             */
            return(new Description(path, Enumerable.Empty <Facet>()));
        }
Beispiel #2
0
 public IRegister BuildRegistration(Component.IIdentity registrar, Component.IEntity entity)
 {
     return(new Register(registrar, entity));
 }
Beispiel #3
0
 public Register(Component.IIdentity registrar, Component.IEntity entity)
 {
     Registrar = registrar;
     Entity    = entity;
 }
Beispiel #4
0
        public void Add(Component.IEntity device)
        {
            Object.Description description = _objectFactory.Describe(device);

            Add(description);
        }