![]() |
Paradox Game Engine
v1.0.0 beta06
|
A collection of AssetItem that contains only absolute location without any drive information. This class cannot be inherited. More...
Public Member Functions | |
| PackageAssetCollection (Package package) | |
| Initializes a new instance of the PackageAssetCollection class. More... | |
| bool | ContainsById (Guid assetId) |
| Determines whether this instance contains an asset with the specified identifier. More... | |
| AssetItem | Find (string location) |
| Finds an asset by its location. More... | |
| AssetItem | Find (Guid assetId) |
| Finds an asset by its location. More... | |
| void | Add (AssetItem item) |
| Adds an AssetItem to this instance. More... | |
| void | Clear () |
| Removes all items from this instance. More... | |
| bool | Contains (AssetItem assetItem) |
| Checks this collection contains the specified asset reference, throws an exception if not found. More... | |
| void | CopyTo (AssetItem[] array, int arrayIndex) |
| Copies items to the specified array. More... | |
| bool | Remove (AssetItem item) |
| Removes an AssetItem from this instance. More... | |
| bool | RemoveById (Guid itemId) |
| Removes an AssetItem from this instance. More... | |
| void | SuspendCollectionChanged () |
| Suspends the collection changed that can happen on this collection. More... | |
| void | ResumeCollectionChanged () |
| Resumes the collection changed that happened on this collection and fire a NotifyCollectionChangedAction.Reset More... | |
| void | CheckCanAdd (AssetItem item) |
| Checks if the specified item can be add to this collection. More... | |
| IEnumerator< AssetItem > | GetEnumerator () |
Properties | |
| Package | Package [get] |
| Gets the package this collection is attached to. More... | |
| bool | IsDirty [get, set] |
| Gets or sets a value indicating whether this instance is dirty. Sets this flag when moving assets between packages or removing assets. More... | |
| int | Count [get] |
| Gets the number of elements contained in this instance. More... | |
| bool | IsReadOnly [get] |
| Gets a value indicating whether this collection is read-only. Default is false. More... | |
Properties inherited from SiliconStudio.Assets.IDirtyable | |
| bool | IsDirty [get, set] |
| Gets or sets a value indicating whether this instance is dirty. More... | |
Events | |
| NotifyCollectionChangedEventHandler | CollectionChanged |
| Occurs when the collection changes. More... | |
A collection of AssetItem that contains only absolute location without any drive information. This class cannot be inherited.
Definition at line 20 of file PackageAssetCollection.cs.
| SiliconStudio.Assets.PackageAssetCollection.PackageAssetCollection | ( | Package | package | ) |
Initializes a new instance of the PackageAssetCollection class.
| package | The package that will contain assets. |
Definition at line 48 of file PackageAssetCollection.cs.
| void SiliconStudio.Assets.PackageAssetCollection.Add | ( | AssetItem | item | ) |
Adds an AssetItem to this instance.
| item | The item to add to this instance. |
Definition at line 118 of file PackageAssetCollection.cs.
| void SiliconStudio.Assets.PackageAssetCollection.CheckCanAdd | ( | AssetItem | item | ) |
Checks if the specified item can be add to this collection.
| item | The item. |
| System.ArgumentNullException | item;Cannot add an empty asset item reference or item;Cannot add an item with an empty asset or item;Cannot add an asset with an empty Id or item;Location cannot be null when adding an asset reference |
| System.ArgumentException | An asset with the same location is already registered [{0}].ToFormat(location.Path);item or An asset with the same id [{0}] is already registered with the location [{1}].ToFormat(item.Id, location.Path);item or Asset location [{0}] cannot contain drive information.ToFormat(location);item or Asset location [{0}] must be relative and not absolute (not start with '/').ToFormat(location);item or Asset location [{0}] cannot start with relative '..'.ToFormat(location);item |
Definition at line 326 of file PackageAssetCollection.cs.
References SiliconStudio.Assets.AssetItem.Id, SiliconStudio.Assets.AssetItem.Package, SiliconStudio.Assets.PackageSession.Packages, and SiliconStudio.Assets.Package.Session.
| void SiliconStudio.Assets.PackageAssetCollection.Clear | ( | ) |
Removes all items from this instance.
Definition at line 156 of file PackageAssetCollection.cs.
| bool SiliconStudio.Assets.PackageAssetCollection.Contains | ( | AssetItem | assetItem | ) |
Checks this collection contains the specified asset reference, throws an exception if not found.
| assetItem | The asset item. |
| System.ArgumentNullException | assetItem |
| System.Collections.Generic.KeyNotFoundException | Asset [{0}] was not found.ToFormat(assetItem) |
Definition at line 187 of file PackageAssetCollection.cs.
| bool SiliconStudio.Assets.PackageAssetCollection.ContainsById | ( | Guid | assetId | ) |
Determines whether this instance contains an asset with the specified identifier.
| assetId | The asset identifier. |
true if this instance contains an asset with the specified identifier; otherwise, false.Definition at line 82 of file PackageAssetCollection.cs.
| void SiliconStudio.Assets.PackageAssetCollection.CopyTo | ( | AssetItem[] | array, |
| int | arrayIndex | ||
| ) |
Copies items to the specified array.
| array | The array. |
| arrayIndex | Index of the array. |
Definition at line 198 of file PackageAssetCollection.cs.
| AssetItem SiliconStudio.Assets.PackageAssetCollection.Find | ( | string | location | ) |
Finds an asset by its location.
| location | The location of the assets. |
Definition at line 92 of file PackageAssetCollection.cs.
| AssetItem SiliconStudio.Assets.PackageAssetCollection.Find | ( | Guid | assetId | ) |
Finds an asset by its location.
| assetId | The asset unique identifier. |
Definition at line 107 of file PackageAssetCollection.cs.
| IEnumerator<AssetItem> SiliconStudio.Assets.PackageAssetCollection.GetEnumerator | ( | ) |
Definition at line 396 of file PackageAssetCollection.cs.
| bool SiliconStudio.Assets.PackageAssetCollection.Remove | ( | AssetItem | item | ) |
Removes an AssetItem from this instance.
| item | The object to remove from the T:System.Collections.Generic.ICollection`1. |
Definition at line 208 of file PackageAssetCollection.cs.
| bool SiliconStudio.Assets.PackageAssetCollection.RemoveById | ( | Guid | itemId | ) |
Removes an AssetItem from this instance.
| itemId | The item identifier. |
Definition at line 239 of file PackageAssetCollection.cs.
| void SiliconStudio.Assets.PackageAssetCollection.ResumeCollectionChanged | ( | ) |
Resumes the collection changed that happened on this collection and fire a NotifyCollectionChangedAction.Reset
Definition at line 260 of file PackageAssetCollection.cs.
| void SiliconStudio.Assets.PackageAssetCollection.SuspendCollectionChanged | ( | ) |
Suspends the collection changed that can happen on this collection.
Definition at line 252 of file PackageAssetCollection.cs.
|
get |
Gets the number of elements contained in this instance.
Definition at line 283 of file PackageAssetCollection.cs.
|
getset |
Gets or sets a value indicating whether this instance is dirty. Sets this flag when moving assets between packages or removing assets.
true if this instance is dirty; otherwise, false.
Definition at line 75 of file PackageAssetCollection.cs.
|
get |
Gets a value indicating whether this collection is read-only. Default is false.
Definition at line 295 of file PackageAssetCollection.cs.
|
get |
Gets the package this collection is attached to.
The package.
Definition at line 63 of file PackageAssetCollection.cs.
| NotifyCollectionChangedEventHandler SiliconStudio.Assets.PackageAssetCollection.CollectionChanged |
Occurs when the collection changes.
Definition at line 42 of file PackageAssetCollection.cs.