Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
PackageSessionAnalysis.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.Diagnostics;
5 using SiliconStudio.Core.IO;
6 
7 namespace SiliconStudio.Assets.Analysis
8 {
9  /// <summary>
10  /// A package analysis provides methods to validate the integrity of a whole package.
11  /// </summary>
13  {
14  private readonly PackageAnalysisParameters parameters;
15 
16  /// <summary>
17  /// Initializes a new instance of the <see cref="PackageSessionAnalysis" /> class.
18  /// </summary>
19  /// <param name="packageSession">The package session.</param>
20  /// <param name="parameters">The parameters.</param>
22  : base(packageSession)
23  {
24  if (parameters == null) throw new ArgumentNullException("parameters");
25  this.parameters = (PackageAnalysisParameters)parameters.Clone();
26  this.parameters.IsPackageCheckDependencies = true;
27  }
28 
29  /// <summary>
30  /// Gets the parameters.
31  /// </summary>
32  /// <value>The parameters.</value>
33  public PackageAnalysisParameters Parameters
34  {
35  get
36  {
37  return parameters;
38  }
39  }
40 
41  /// <summary>
42  /// Performs a wide package validation analysis.
43  /// </summary>
44  /// <param name="log">The log to output the result of the validation.</param>
45  public override void Run(ILogger log)
46  {
47  if (log == null) throw new ArgumentNullException("log");
48 
49  foreach (var package in Session.LocalPackages)
50  {
51  var analysis = new PackageAnalysis(package, parameters);
52  analysis.Run(log);
53  }
54  }
55  }
56 }
Class PackageAnalysisParameters. This class cannot be inherited.
An analysis to check the validity of a Package, convert UFile or UDirectory references to absolute/re...
Base class for all Session and Asset integrity analysis.
A session for editing a package.
PackageSessionAnalysis(PackageSession packageSession, PackageAnalysisParameters parameters)
Initializes a new instance of the PackageSessionAnalysis class.
A package analysis provides methods to validate the integrity of a whole package. ...
override void Run(ILogger log)
Performs a wide package validation analysis.
Interface for logging.
Definition: ILogger.cs:8