Beispiel #1
0
 /// <summary>
 /// Adds an part asset
 /// </summary>
 /// <param name="part">An part asset.</param>
 public void AddPart(AssetPart part)
 {
     if (parts == null)
     {
         parts = new Dictionary <Guid, AssetPart>();
     }
     parts[part.Id] = part;
 }
Beispiel #2
0
 /// <summary>
 /// Tries to get an part asset from its identifier.
 /// </summary>
 /// <param name="id">Identifier of the part asset.</param>
 /// <param name="part">Returned part asset if this method returns <c>true</c></param>
 /// <returns><c>true</c> if the part asset with the specified identifier exist; otherwise <c>false</c></returns>
 public bool TryGetAssetPart(Guid id, out AssetPart part)
 {
     if (parts == null)
     {
         part = default(AssetPart);
         return(false);
     }
     return(parts.TryGetValue(id, out part));
 }
Beispiel #3
0
        /// <summary>
        /// Tries to get an part asset from its identifier.
        /// </summary>
        /// <param name="id">Identifier of the part asset.</param>
        /// <param name="part">Returned part asset if this method returns <c>true</c></param>
        /// <returns><c>true</c> if the part asset with the specified identifier exist; otherwise <c>false</c></returns>
        public bool TryGetAssetPart(Guid id, out AssetPart part)
        {

            if (parts == null)
            {
                part = default(AssetPart);
                return false;
            }
            return parts.TryGetValue(id, out part);
        }
Beispiel #4
0
 /// <summary>
 /// Adds an part asset
 /// </summary>
 /// <param name="part">An part asset.</param>
 public void AddPart(AssetPart part)
 {
     if (parts == null)
     {
         parts = new Dictionary<Guid, AssetPart>();
     }
     parts[part.Id] = part;
 }