Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
AssetFileChangedEvent.cs
Go to the documentation of this file.
1 // Copyright (c) 2014 Silicon Studio Corp. (http://siliconstudio.co.jp)
2 // This file is distributed under GPL v3. See LICENSE.md for details.
3 using System;
4 using SiliconStudio.Core.IO;
5 using SiliconStudio.Core.Storage;
6 
7 namespace SiliconStudio.Assets.Analysis
8 {
9  /// <summary>
10  /// An event that notifies the type of disk change for an asset.
11  /// </summary>
13  {
14  /// <summary>
15  /// Initializes a new instance of the <see cref="AssetFileChangedEvent"/> class.
16  /// </summary>
17  /// <param name="package">The package.</param>
18  /// <param name="changeType">Type of the change.</param>
19  /// <param name="assetLocation">The asset URL.</param>
20  public AssetFileChangedEvent(Package package, AssetFileChangedType changeType, UFile assetLocation)
21  {
22  Package = package;
23  ChangeType = changeType;
24  AssetLocation = assetLocation.GetDirectoryAndFileName(); // Make sure we are using the location withint the package without the extension
25  }
26 
27  /// <summary>
28  /// Gets the package the event is related to.
29  /// </summary>
30  /// <value>The package.</value>
31  public Package Package { get; set; }
32 
33  /// <summary>
34  /// Gets the type of the change.
35  /// </summary>
36  /// <value>The type of the change.</value>
37  public AssetFileChangedType ChangeType { get; set; }
38 
39  /// <summary>
40  /// Gets or sets the asset identifier.
41  /// </summary>
42  /// <value>The asset identifier.</value>
43  public Guid AssetId { get; set; }
44 
45  /// <summary>
46  /// Gets the asset location relative to the package.
47  /// </summary>
48  /// <value>The asset location.</value>
49  public UFile AssetLocation { get; set; }
50 
51  /// <summary>
52  /// Gets or sets the hash of the asset source (optional).
53  /// </summary>
54  /// <value>
55  /// The hash of the asset source.
56  /// </value>
57  public ObjectId? Hash { get; set; }
58  }
59 }
An event that notifies the type of disk change for an asset.
AssetFileChangedEvent(Package package, AssetFileChangedType changeType, UFile assetLocation)
Initializes a new instance of the AssetFileChangedEvent class.
AssetFileChangedType
Type of a change event for an asset.
A hash to uniquely identify data.
Definition: ObjectId.cs:13
A package managing assets.
Definition: Package.cs:28
Defines a normalized file path. See UPath for details. This class cannot be inherited.
Definition: UFile.cs:13