Ejemplo n.º 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;
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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;
        }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }