Paradox Game Engine  v1.0.0 beta06
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros Pages
SiliconStudio.Assets.PackageSession Class Reference

A session for editing a package. More...

Inheritance diagram for SiliconStudio.Assets.PackageSession:
SiliconStudio.Assets.IDirtyable

Public Member Functions

 PackageSession ()
 Initializes a new instance of the PackageSession class. More...
 
 PackageSession (Package package)
 Initializes a new instance of the PackageSession class. More...
 
void Dispose ()
 Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources. More...
 
IEnumerable< PackageGetPackagesFromCurrent ()
 Gets the packages referenced by the current package. More...
 
LoggerResult AddExistingPackage (UFile packagePath, PackageLoadParameters loadParameters=null)
 Adds an existing package to the current session. More...
 
Package AddExistingPackage (UFile packagePath, ILogger logger, PackageLoadParameters loadParametersArg=null)
 Adds an existing package to the current session. More...
 
void LoadMissingReferences (ILogger log, PackageLoadParameters loadParametersArg=null)
 Loads the missing references More...
 
LoggerResult Save ()
 Saves all packages and assets. More...
 

Static Public Member Functions

static void Load (string filePath, PackageSessionResult sessionResult, PackageLoadParameters loadParameters=null)
 Loads a package from specified file path. More...
 
static PackageSessionResult Load (string filePath, PackageLoadParameters loadParameters=null)
 Loads a package from specified file path. More...
 

Properties

bool IsDirty [get, set]
 
PackageCollection Packages [get]
 Gets the packages. More...
 
IEnumerable< PackageLocalPackages [get]
 Gets the user packages (excluding system packages). More...
 
UFile SolutionPath [get, set]
 Gets or sets the solution path (sln) in case the session was loaded from a solution. More...
 
bool HasDependencyManager [get]
 Gets a value indicating whether this instance has dependency manager. More...
 
Package CurrentPackage [get, set]
 Gets or sets the selected current package. More...
 
AssetDependencyManager DependencyManager [get]
 Gets the dependency manager. More...
 
- Properties inherited from SiliconStudio.Assets.IDirtyable
bool IsDirty [get, set]
 Gets or sets a value indicating whether this instance is dirty. More...
 

Events

Action< AssetAssetDirtyChanged
 

Detailed Description

A session for editing a package.

Definition at line 27 of file PackageSession.cs.

Constructor & Destructor Documentation

SiliconStudio.Assets.PackageSession.PackageSession ( )

Initializes a new instance of the PackageSession class.

Definition at line 41 of file PackageSession.cs.

SiliconStudio.Assets.PackageSession.PackageSession ( Package  package)

Initializes a new instance of the PackageSession class.

Definition at line 48 of file PackageSession.cs.

Member Function Documentation

LoggerResult SiliconStudio.Assets.PackageSession.AddExistingPackage ( UFile  packagePath,
PackageLoadParameters  loadParameters = null 
)

Adds an existing package to the current session.

Parameters
packagePathThe package path.
loadParametersThe load parameters.
Exceptions
System.ArgumentNullExceptionpackagePath
System.IO.FileNotFoundExceptionUnable to find package

Definition at line 199 of file PackageSession.cs.

Package SiliconStudio.Assets.PackageSession.AddExistingPackage ( UFile  packagePath,
ILogger  logger,
PackageLoadParameters  loadParametersArg = null 
)

Adds an existing package to the current session.

Parameters
packagePathThe package path.
loggerThe session result.
loadParametersArgThe load parameters argument.
Exceptions
System.ArgumentNullExceptionpackagePath
System.ArgumentExceptionInvalid relative path. Expecting an absolute package path;packagePath
System.IO.FileNotFoundExceptionUnable to find package

Definition at line 215 of file PackageSession.cs.

References SiliconStudio.Core.IO.UPath.IsAbsolute.

void SiliconStudio.Assets.PackageSession.Dispose ( )

Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.

Definition at line 96 of file PackageSession.cs.

IEnumerable<Package> SiliconStudio.Assets.PackageSession.GetPackagesFromCurrent ( )

Gets the packages referenced by the current package.

Returns
IEnumerable<Package>.

Definition at line 147 of file PackageSession.cs.

static void SiliconStudio.Assets.PackageSession.Load ( string  filePath,
PackageSessionResult  sessionResult,
PackageLoadParameters  loadParameters = null 
)
static

Loads a package from specified file path.

Parameters
filePathThe file path to a package file.
sessionResultThe session result.
loadParametersThe load parameters.
Returns
A package.
Exceptions
System.ArgumentNullExceptionfilePath
System.ArgumentExceptionFile [{0}] must exist.ToFormat(filePath);filePath

Definition at line 258 of file PackageSession.cs.

static PackageSessionResult SiliconStudio.Assets.PackageSession.Load ( string  filePath,
PackageLoadParameters  loadParameters = null 
)
static

Loads a package from specified file path.

Parameters
filePathThe file path to a package file.
loadParametersThe load parameters.
Returns
A package.
Exceptions
System.ArgumentNullExceptionfilePath

Definition at line 350 of file PackageSession.cs.

void SiliconStudio.Assets.PackageSession.LoadMissingReferences ( ILogger  log,
PackageLoadParameters  loadParametersArg = null 
)

Loads the missing references

Parameters
logThe log.
loadParametersArgThe load parameters argument.

Definition at line 362 of file PackageSession.cs.

Property Documentation

Package SiliconStudio.Assets.PackageSession.CurrentPackage
getset

Gets or sets the selected current package.

The selected current package.

Exceptions
System.InvalidOperationExceptionExpecting a package that is already registered in this session

Definition at line 125 of file PackageSession.cs.

AssetDependencyManager SiliconStudio.Assets.PackageSession.DependencyManager
get

Gets the dependency manager.

AssetDependencyManager.

Definition at line 182 of file PackageSession.cs.

bool SiliconStudio.Assets.PackageSession.HasDependencyManager
get

Gets a value indicating whether this instance has dependency manager.

true if this instance has dependency manager; otherwise, false.

Definition at line 109 of file PackageSession.cs.

bool SiliconStudio.Assets.PackageSession.IsDirty
getset

Definition at line 61 of file PackageSession.cs.

IEnumerable<Package> SiliconStudio.Assets.PackageSession.LocalPackages
get

Gets the user packages (excluding system packages).

The user packages.

Definition at line 80 of file PackageSession.cs.

PackageCollection SiliconStudio.Assets.PackageSession.Packages
get
UFile SiliconStudio.Assets.PackageSession.SolutionPath
getset

Gets or sets the solution path (sln) in case the session was loaded from a solution.

The solution path.

Definition at line 91 of file PackageSession.cs.

Event Documentation

Action<Asset> SiliconStudio.Assets.PackageSession.AssetDirtyChanged

Definition at line 36 of file PackageSession.cs.


The documentation for this class was generated from the following file: