예제 #1
0
 /// <summary>
 /// Registers a Component in the Component Server
 /// </summary>
 /// <remarks>When a Component is registered with a Component Server it becomes part of its Remote Component Set (RCS). Registering a Component is the remote equivalent of Attaching a local Component. The name parameter specifies not only the name of the component on the remote server, but also the name which will be used to refer to the component locally and must be unique (all components must have unique names anyway)</remarks>
 /// <param name="component">A RemoteComponent structure containing information about the component</param>
 public void RegisterComponent(RemoteComponent component)
 {
     if (remoteComponents.ContainsKey(component.Name))
         log.Warn("[RegisterComponent] Remote component with specified name (" + component.Name + ") exists, component will be replaced");
     remoteComponents[component.Name] = component;
     log.Info("[RegisterComponent] Registered: " + component.Name);
 }
예제 #2
0
 /// <summary>
 /// Registers a Component in the Component Server
 /// </summary>
 /// <remarks>When a Component is registered with a Component Server it becomes part of its Remote Component Set (RCS). Registering a Component is the remote equivalent of Attaching a local Component. The name parameter specifies not only the name of the component on the remote server, but also the name which will be used to refer to the component locally and must be unique (all components must have unique names anyway)</remarks>
 /// <param name="component">A RemoteComponent structure containing information about the component</param>
 public void RegisterComponent(RemoteComponent component)
 {
     if (remoteComponents.ContainsKey(component.Name))
         log.Warn("[RegisterComponent] Remote component with specified name (" + component.Name + ") exists, component will be replaced");
     else if (manager.Contains(component.Name))
     {
         log.Warn("[RegisterComponent] Local component with specified name (" + component.Name + ") exists, component will be replaced");
         manager.RemoveComponent(component.Name);
     }
     remoteComponents[component.Name] = component;
     log.Info("[RegisterComponent] Registered: " + component.Name);
 }