Ejemplo n.º 1
0
 public void AddCandidateVersion(PForwardedComponent instance)
 {
     if (instance == null)
     {
         throw new ArgumentNullException(nameof(instance));
     }
     AddCandidateVersion(instance.ID, instance);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Adds a remote or local forwarded component by ID.
        /// </summary>
        /// <param name="id">The real ID of the component.</param>
        /// <param name="instance">The candidate instance to add.</param>
        private void AddCandidateVersion(string id, PForwardedComponent instance)
        {
            var versions = forwardedComponents.GetOrAdd(id, (_) => new PVersionList());

            if (versions == null)
            {
                PRegistry.LogPatchWarning("Missing version info for component type " + id);
            }
            else
            {
                var  list  = versions.Components;
                bool first = list.Count < 1;
                list.Add(instance);
#if DEBUG
                PRegistry.LogPatchDebug("Candidate version of {0} from {1}".F(id, instance.
                                                                              GetOwningAssembly()));
#endif
                if (first)
                {
                    instance.Bootstrap(PLibInstance);
                }
            }
        }
Ejemplo n.º 3
0
 public void AddCandidateVersion(PForwardedComponent instance)
 {
     addCandidateVersion.Invoke(instance);
 }