C# Class JsonFx.Compilation.ResourceBuildProvider

Inheritance: System.Web.Compilation.BuildProvider, IResourceBuildHelper
ファイルを表示 Open project: pocket-playlab/jsonfx-v1 Class Usage Examples

Private Properties

Property Type Description
AddDependency void
EnsureAssemblyDependencies void
EnsureDependencies void
FormatBytes string
IResourceBuildHelper System.Web.Compilation.CompilerType
IResourceBuildHelper TextReader
IResourceBuildHelper void
IResourceBuildHelper void
QuoteSnippetStringCStyle string

Public Methods

Method Description
Compress ( string source, byte &gzipped, byte &deflated ) : void
ComputeHash ( string value ) : string

Generates a unique hash from string

GenerateCode ( AssemblyBuilder assemblyBuilder ) : void
GenerateTypeNameFromPath ( string virtualPath ) : string

Generates a Type name for the compiled resource

GetGeneratedType ( CompilerResults results ) : Type

Protected Methods

Method Description
AddAssemblyDependency ( Assembly assembly ) : void
AddAssemblyDependency ( string assemblyName ) : void
ComputeHash ( Stream value ) : string

Generates a unique hash from byte[]

ComputeHash ( byte value ) : string

Generates a unique hash from byte[]

Private Methods

Method Description
AddDependency ( string virtualPath ) : void
EnsureAssemblyDependencies ( ) : void
EnsureDependencies ( ) : void
FormatBytes ( byte value ) : string

Gets the hex digits for the given bytes

IResourceBuildHelper ( string language ) : System.Web.Compilation.CompilerType
IResourceBuildHelper ( string virtualPath ) : TextReader
IResourceBuildHelper ( Assembly assembly ) : void
IResourceBuildHelper ( string virtualPath ) : void
QuoteSnippetStringCStyle ( string value ) : string

Escapes a C# string using C-style escape sequences.

Adapted from Microsoft.CSharp.CSharpCodeGenerator.QuoteSnippetStringCStyle Primary difference is does not wrap at 80 chars as can cause C# compiler to fail.

Method Details

AddAssemblyDependency() protected method

protected AddAssemblyDependency ( Assembly assembly ) : void
assembly System.Reflection.Assembly
return void

AddAssemblyDependency() protected method

protected AddAssemblyDependency ( string assemblyName ) : void
assemblyName string
return void

Compress() public static method

public static Compress ( string source, byte &gzipped, byte &deflated ) : void
source string
gzipped byte
deflated byte
return void

ComputeHash() protected static method

Generates a unique hash from byte[]
protected static ComputeHash ( Stream value ) : string
value Stream
return string

ComputeHash() protected static method

Generates a unique hash from byte[]
protected static ComputeHash ( byte value ) : string
value byte
return string

ComputeHash() public static method

Generates a unique hash from string
public static ComputeHash ( string value ) : string
value string
return string

GenerateCode() public method

public GenerateCode ( AssemblyBuilder assemblyBuilder ) : void
assemblyBuilder System.Web.Compilation.AssemblyBuilder
return void

GenerateTypeNameFromPath() public static method

Generates a Type name for the compiled resource
public static GenerateTypeNameFromPath ( string virtualPath ) : string
virtualPath string
return string

GetGeneratedType() public method

public GetGeneratedType ( CompilerResults results ) : Type
results System.CodeDom.Compiler.CompilerResults
return System.Type