Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
AssetImportSessionEvent.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 
5 namespace SiliconStudio.Assets
6 {
7  /// <summary>
8  /// An event generated by <see cref="AssetImportSession"/> by the <see cref="AssetImportSession.Progress"/> handler.
9  /// This class cannot be inherited.
10  /// </summary>
11  public sealed class AssetImportSessionEvent : EventArgs
12  {
13  /// <summary>
14  /// Initializes a new instance of the <see cref="AssetImportSessionEvent"/> class.
15  /// </summary>
16  /// <param name="type">The step.</param>
17  /// <param name="step">The Step.</param>
18  /// <param name="toImportByImporter">To import by importer.</param>
19  /// <exception cref="System.ArgumentNullException">toImportByImporter</exception>
21  {
22  if (toImportByImporter == null) throw new ArgumentNullException("toImportByImporter");
23  Type = type;
24  Step = step;
25  ToImportByImporter = toImportByImporter;
26  ToImport = null;
27  }
28 
29  /// <summary>
30  /// Initializes a new instance of the <see cref="AssetImportSessionEvent"/> class.
31  /// </summary>
32  /// <param name="type">The step.</param>
33  /// <param name="step">The Step.</param>
34  /// <param name="toImport">To import merge group.</param>
35  /// <exception cref="System.ArgumentNullException">ToImport</exception>
37  {
38  if (toImport == null) throw new ArgumentNullException("toImport");
39  Type = type;
40  Step = step;
41  ToImportByImporter = toImport.Parent;
42  ToImport = toImport;
43  }
44 
45 
46  /// <summary>
47  /// Gets the type of event.
48  /// </summary>
49  /// <value>The type.</value>
50  public AssetImportSessionEventType Type { get; private set; }
51 
52  /// <summary>
53  /// Gets the step of this event.
54  /// </summary>
55  /// <value>The step.</value>
56  public AssetImportSessionStepType Step { get; private set; }
57 
58  /// <summary>
59  /// Gets the asset being imported with its specified importer.
60  /// </summary>
61  /// <value>To import by importer.</value>
62  public AssetToImportByImporter ToImportByImporter { get; private set; }
63 
64  /// <summary>
65  /// Gets the asset being imported.
66  /// </summary>
67  /// <value>To import.</value>
68  public AssetToImportMergeGroup ToImport { get; private set; }
69  }
70 }
An event generated by AssetImportSession by the AssetImportSession.Progress handler. This class cannot be inherited.
AssetImportSessionEvent(AssetImportSessionEventType type, AssetImportSessionStepType step, AssetToImportMergeGroup toImport)
Initializes a new instance of the AssetImportSessionEvent class.
AssetImportSessionEventType
The type of event begin or end published by AssetImportSession.Progress
Describes an asset to import associated with possible existing assets, mergeable or not...
Describes the importer that will import an AssetToImport and the generated list of assets to import...
AssetImportSessionStepType
The step being processed by the AssetImportSession
AssetImportSessionEvent(AssetImportSessionEventType type, AssetImportSessionStepType step, AssetToImportByImporter toImportByImporter)
Initializes a new instance of the AssetImportSessionEvent class.