/// <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; }
/// <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)); }
/// <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); }
/// <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; }