C# 클래스 Terrarium.Game.PrivateAssemblyCache

파일 보기 프로젝트 열기: eugeniomiro/Terrarium 1 사용 예제들

Private Properties

프로퍼티 타입 설명
Initialize void
PrivateAssemblyCache System
ResolveAssembly System.Reflection.Assembly
checkAssemblyWithReporting int
getAssemblyWithTerrariumBindingPolicy System.Reflection.Assembly

공개 메소드들

메소드 설명
BlacklistAssemblies ( string assemblies ) : void

Blacklist a series of assemblies by setting their assemblies to zero length files. This is a way of ensuring that we don't load them again, or replace them with fresh working copies because the file name gets reserved with an invalid assembly.

Close ( ) : void

Handles controlled shut-down of the PAC and unhooking the assembly resolving events.

Exists ( string fullName ) : System.Boolean

Determine if the assembly with the given full name exists within the PAC.

GetAssemblies ( ) : Terrarium.Game.OrganismAssemblyInfo[]

Gets a full listing of all of the assemblies in the cache. This can be used to populate dropdowns or lists.

GetAssemblyShortName ( string fullName ) : string

Given an assembly full name, generates an assembly short name.

GetAssemblyVersion ( string fullName ) : string

Given an assembly full name, generates an assembly version string.

GetBaseAssemblyDirectory ( string dataPath, string dataFile ) : string

Creates a base assembly directory without obfuscation from a path and file name.

GetBlacklistedAssemblies ( ) : string[]

Get a list of all assemblies in the cache that have 0 bytes. A 0 byte assembly fails to load.

GetFileName ( string fullName ) : string

Given an assembly full name, generates a library file name for an assembly.

GetSafeTempFileName ( ) : string

Creates a temp file that can't be guessed for security reasons.

HookAssemblyResolve ( ) : void

Hooks the assembly resolving events for the current app domain.

LoadOrganismAssembly ( string fullName ) : Assembly

Load an organism assembly. Calculate the size of the PAC based on the assemblies loaded.

PrivateAssemblyCache ( string dataPath, string dataFile ) : System

Creates a new private assembly cache initialized with a data path and data file.

PrivateAssemblyCache ( string dataPath, string dataFile, bool hookAssemblyResolve, bool trackLastRun ) : System

Creates a new private assembly cache initialized with a data path, data file, and controls whether assemblies are resolved, and organism tracking is in effect.

SaveOrganismAssembly ( string assemblyPath, string fullName ) : void

Save an assembly given a full path to the assembly and the full name of the assembly to the cache.

SaveOrganismAssembly ( string assemblyPath, string symbolPath, string fullName ) : void

Save an assembly along with symbols given a full path to the assembly and symbols to the cache.

SaveOrganismBytes ( byte bytes, string fullName ) : void

Saves the array of bytes given an assembly full name to the private assembly cache.

보호된 메소드들

메소드 설명
OnPacAssembliesChanged ( EventArgs e ) : void

Helper function for calling the PacAssembliesChanged event.

비공개 메소드들

메소드 설명
Initialize ( string dataPath, string dataFile, bool hookAssemblyResolve, bool trackLastRun ) : void

Helper function for initializing the PAC constructors.

PrivateAssemblyCache ( ) : System

Initializes a versioned directory preamble used to create versioned assembly directories.

ResolveAssembly ( Object sender, ResolveEventArgs args ) : Assembly

Called whenever assemblies are being resolved for use.

checkAssemblyWithReporting ( string assemblyName, string xmlFile ) : int

Used for assembly validation with XML reporting in AsmCheck

getAssemblyWithTerrariumBindingPolicy ( string testAssemblyName, Assembly potentialMatchAssembly ) : Assembly

Check to see if an assembly can be found that matches a reduced set of fusion version requirements. We ignore the revision.

메소드 상세

BlacklistAssemblies() 공개 메소드

Blacklist a series of assemblies by setting their assemblies to zero length files. This is a way of ensuring that we don't load them again, or replace them with fresh working copies because the file name gets reserved with an invalid assembly.
public BlacklistAssemblies ( string assemblies ) : void
assemblies string The assemblies to be blacklisted.
리턴 void

Close() 공개 메소드

Handles controlled shut-down of the PAC and unhooking the assembly resolving events.
public Close ( ) : void
리턴 void

Exists() 공개 메소드

Determine if the assembly with the given full name exists within the PAC.
public Exists ( string fullName ) : System.Boolean
fullName string The full name of the assembly to check for.
리턴 System.Boolean

GetAssemblies() 공개 메소드

Gets a full listing of all of the assemblies in the cache. This can be used to populate dropdowns or lists.
public GetAssemblies ( ) : Terrarium.Game.OrganismAssemblyInfo[]
리턴 Terrarium.Game.OrganismAssemblyInfo[]

GetAssemblyShortName() 공개 정적인 메소드

Given an assembly full name, generates an assembly short name.
public static GetAssemblyShortName ( string fullName ) : string
fullName string The assembly full name.
리턴 string

GetAssemblyVersion() 공개 정적인 메소드

Given an assembly full name, generates an assembly version string.
public static GetAssemblyVersion ( string fullName ) : string
fullName string The assembly full name.
리턴 string

GetBaseAssemblyDirectory() 공개 정적인 메소드

Creates a base assembly directory without obfuscation from a path and file name.
public static GetBaseAssemblyDirectory ( string dataPath, string dataFile ) : string
dataPath string The base path of the data file.
dataFile string The name of the datafile for creating a cache directory.
리턴 string

GetBlacklistedAssemblies() 공개 메소드

Get a list of all assemblies in the cache that have 0 bytes. A 0 byte assembly fails to load.
public GetBlacklistedAssemblies ( ) : string[]
리턴 string[]

GetFileName() 공개 메소드

Given an assembly full name, generates a library file name for an assembly.
public GetFileName ( string fullName ) : string
fullName string The assembly full name.
리턴 string

GetSafeTempFileName() 공개 정적인 메소드

Creates a temp file that can't be guessed for security reasons.
public static GetSafeTempFileName ( ) : string
리턴 string

HookAssemblyResolve() 공개 메소드

Hooks the assembly resolving events for the current app domain.
public HookAssemblyResolve ( ) : void
리턴 void

LoadOrganismAssembly() 공개 메소드

Load an organism assembly. Calculate the size of the PAC based on the assemblies loaded.
public LoadOrganismAssembly ( string fullName ) : Assembly
fullName string The name of the assembly to load.
리턴 System.Reflection.Assembly

OnPacAssembliesChanged() 보호된 메소드

Helper function for calling the PacAssembliesChanged event.
protected OnPacAssembliesChanged ( EventArgs e ) : void
e System.EventArgs Null
리턴 void

PrivateAssemblyCache() 공개 메소드

Creates a new private assembly cache initialized with a data path and data file.
public PrivateAssemblyCache ( string dataPath, string dataFile ) : System
dataPath string Path where the data will be stored.
dataFile string Path to a tracking data file.
리턴 System

PrivateAssemblyCache() 공개 메소드

Creates a new private assembly cache initialized with a data path, data file, and controls whether assemblies are resolved, and organism tracking is in effect.
public PrivateAssemblyCache ( string dataPath, string dataFile, bool hookAssemblyResolve, bool trackLastRun ) : System
dataPath string Path to where the cache will be stored.
dataFile string Path to the tracking data file.
hookAssemblyResolve bool Determines if the assembly resolving events are hooked.
trackLastRun bool Determines if organism tracking is senabled.
리턴 System

SaveOrganismAssembly() 공개 메소드

Save an assembly given a full path to the assembly and the full name of the assembly to the cache.
public SaveOrganismAssembly ( string assemblyPath, string fullName ) : void
assemblyPath string A local path to the assembly.
fullName string The full name of the assembly.
리턴 void

SaveOrganismAssembly() 공개 메소드

Save an assembly along with symbols given a full path to the assembly and symbols to the cache.
public SaveOrganismAssembly ( string assemblyPath, string symbolPath, string fullName ) : void
assemblyPath string A local path to the assembly.
symbolPath string A local path to the symbols.
fullName string The full name of the assembly.
리턴 void

SaveOrganismBytes() 공개 메소드

Saves the array of bytes given an assembly full name to the private assembly cache.
public SaveOrganismBytes ( byte bytes, string fullName ) : void
bytes byte The bytes of the assembly.
fullName string The full name of the original assembly.
리턴 void