Exemplo n.º 1
0
        /// <summary>
        /// Sets an existing <see cref="IReference"/> in the References of this element, or creates if not exist.
        /// </summary>
        public static IReference SetReference(IProductElement element, TValue value)
        {
            Guard.NotNull(() => element, element);
            Guard.NotNull(() => value, value);

            return(element.AddReference(typeIdFromKind, GetStringValue(new ElementDescriptorContext(element), value), true));
        }