private void AddLink(ref Dictionary <Guid, AssetLink> dictionary, AssetLink contentLink, bool cloneAssetItem) { if (dictionary == null) { dictionary = new Dictionary <Guid, AssetLink>(); } var id = contentLink.Element.Id; if (dictionary.ContainsKey(id)) { contentLink.Type |= dictionary[id].Type; } dictionary[id] = cloneAssetItem? contentLink.Clone(): contentLink; }
private void AddLink(ref Dictionary <AssetId, AssetLink> dictionary, AssetLink contentLink) { if (dictionary == null) { dictionary = new Dictionary <AssetId, AssetLink>(); } var id = contentLink.Element.Id; if (dictionary.ContainsKey(id)) { contentLink.Type |= dictionary[id].Type; } dictionary[id] = contentLink; }
/// <summary> /// Adds a link going to the provided element. /// </summary> /// <param name="contentLink">The link out</param> /// <exception cref="ArgumentException">A link to this element already exists</exception> public void AddLinkOut(AssetLink contentLink) { AddLink(ref children, contentLink); }
/// <summary> /// Adds a link coming from the provided element. /// </summary> /// <param name="contentLink">The link in</param> /// <exception cref="ArgumentException">A link from this element already exists</exception> public void AddLinkIn(AssetLink contentLink) { AddLink(ref parents, contentLink); }
private void AddLink(ref Dictionary<Guid, AssetLink> dictionary, AssetLink contentLink) { if(dictionary == null) dictionary = new Dictionary<Guid, AssetLink>(); var id = contentLink.Element.Id; if (dictionary.ContainsKey(id)) contentLink.Type |= dictionary[id].Type; dictionary[id] = contentLink; }
/// <summary> /// Adds a link going to the provided element. /// </summary> /// <param name="contentLink">The link out</param> /// <exception cref="ArgumentException">A link to this element already exists</exception> public void AddLinkOut(AssetLink contentLink) { AddLink(ref children, contentLink); }
/// <summary> /// Adds a link coming from the provided element. /// </summary> /// <param name="contentLink">The link in</param> /// <exception cref="ArgumentException">A link from this element already exists</exception> public void AddLinkIn(AssetLink contentLink) { AddLink(ref parents, contentLink); }
/// <summary> /// Adds a link going to the provided element. /// </summary> /// <param name="contentLink">The link out</param> /// <param name="cloneAssetItem">Indicate if the <see cref="AssetItem"/> should be cloned or not</param> /// <exception cref="ArgumentException">A link to this element already exists</exception> public void AddLinkOut(AssetLink contentLink, bool cloneAssetItem) { AddLink(ref children, contentLink, cloneAssetItem); }
/// <summary> /// Adds a link coming from the provided element. /// </summary> /// <param name="contentLink">The link in</param> /// <param name="cloneAssetItem">Indicate if the <see cref="AssetItem"/> should be cloned or not</param> /// <exception cref="ArgumentException">A link from this element already exists</exception> public void AddLinkIn(AssetLink contentLink, bool cloneAssetItem) { AddLink(ref parents, contentLink, cloneAssetItem); }
/// <summary> /// Adds a link going to the provided element. /// </summary> /// <param name="contentLink">The link out</param> /// <param name="cloneAssetItem">Indicate if the <see cref="AssetItem"/> should be cloned or not</param> /// <exception cref="ArgumentException">A link to this element already exists</exception> public void AddLinkOut(AssetLink contentLink, bool cloneAssetItem) { AddLink(ref children, contentLink, cloneAssetItem); }
/// <summary> /// Adds a link coming from the provided element. /// </summary> /// <param name="contentLink">The link in</param> /// <param name="cloneAssetItem">Indicate if the <see cref="AssetItem"/> should be cloned or not</param> /// <exception cref="ArgumentException">A link from this element already exists</exception> public void AddLinkIn(AssetLink contentLink, bool cloneAssetItem) { AddLink(ref parents, contentLink, cloneAssetItem); }