예제 #1
0
        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;
        }
예제 #2
0
        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;
        }
예제 #3
0
 /// <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);
 }
예제 #4
0
 /// <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);
 }
예제 #5
0
        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;
        }
예제 #6
0
 /// <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);
 }
예제 #7
0
 /// <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);
 }
예제 #8
0
 /// <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);
 }
예제 #9
0
 /// <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);
 }
예제 #10
0
 /// <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);
 }
예제 #11
0
 /// <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);
 }