/// <summary> /// Link other information against this enumerant. /// </summary> /// <param name="ctx"> /// A <see cref="RegistryContext"/> holding the registry information to link. /// </param> internal void Link(RegistryContext ctx) { if (ctx == null) { throw new ArgumentNullException(nameof(ctx)); } RequiredBy.Clear(); RequiredBy.AddRange(GetFeaturesRequiringEnum(ctx)); RemovedBy.Clear(); RemovedBy.AddRange(GetFeaturesRemovingEnum(ctx)); }
/// <summary> /// Link other information against this enumerant. /// </summary> /// <param name="ctx"> /// A <see cref="RegistryContext"/> holding the registry information to link. /// </param> internal void Link(RegistryContext ctx) { if (ctx == null) { throw new ArgumentNullException("ctx"); } RequiredBy.Clear(); RequiredBy.AddRange(GetFeaturesRequiringCommand(ctx)); RemovedBy.Clear(); RemovedBy.AddRange(GetFeaturesRemovingCommand(ctx)); foreach (CommandParameter commandParameter in Parameters) { commandParameter.ParentCommand = this; } }