C# 클래스 Sage.SageContext

Provides the working environment for code within Sage.
상속: IXmlConvertible
파일 보기 프로젝트 열기: igorfrance/sage 1 사용 예제들

공개 메소드들

메소드 설명
ExpandUrl ( string path ) : string

Returns an absolute URL, fully expanded to a path within the current application.

GetProjectVariable ( string name, string locale = null ) : string

Gets the value of the project variable with the specified name.

MapPath ( string path ) : string

Maps the supplied relative path to the actual, physical location of the file.

If the specified path is an absolute path, no translation will be done.

Parse ( XmlElement element ) : void
ProcessNode ( XmlNode node ) : XmlNode

Recursively processes all nodes in the specified node, applying any registered text and node handlers on the way, and returns the result.

ProcessText ( string text ) : string

Replaces any function or variable expression with the result of invoking it's corresponding handler function.

SageContext ( ControllerContext controllerContext, ProjectConfiguration config = null ) : System

Initializes a new instance of the SageContext class, using the specified ControllerContext.

SageContext ( HttpContext httpContext, ProjectConfiguration config = null ) : System

Initializes a new instance of the SageContext class, using the specified HttpContext.

SageContext ( System.Web.HttpContextBase httpContext, string>.Func pathMapper, ProjectConfiguration config = null ) : System

Initializes a new instance of the SageContext class, using the specified HttpContextBase and pathMapper.

SageContext ( System.Web.HttpContextBase httpContext, ProjectConfiguration config = null ) : System

Initializes a new instance of the SageContext class, using the specified HttpContextBase.

SageContext ( System.Web.HttpContextBase httpContext, string categoryName, string>.Func pathMapper, ProjectConfiguration config = null ) : System

Initializes a new instance of the SageContext class, using the specified httpContext, categoryName and pathMapper.

SageContext ( System.Web.HttpContextBase httpContext, string categoryName, ProjectConfiguration config = null ) : System

Initializes a new instance of the SageContext class, using the specified httpContext and categoryName.

SageContext ( System.Web.HttpContextBase httpContext, string categoryName, string localeName, ProjectConfiguration config = null ) : System

Initializes a new instance of the SageContext class, using the specified httpContext and categoryName.

SageContext ( SageContext context, ProjectConfiguration config = null, string>.Func pathMapper = null ) : System

Initializes a new instance of the SageContext class, using an existing context instance.

SageContext ( SageContext context, string categoryName, ProjectConfiguration config = null ) : System

Initializes a new instance of the SageContext class, using an existing context instance.

ToXml ( XmlDocument ownerDocument ) : XmlElement

Gets an XmlElement that contains information about this context.

비공개 메소드들

메소드 설명
Copy ( ) : SageContext

Returns a copy of this instance.

Copy ( string category ) : SageContext

Returns a copy of this instance, setting its category to the specified category.

Copy ( string category, string locale ) : SageContext

Returns a copy of this instance, setting its category and locale to the specified values.

CreateAddressNode ( Uri uri, XmlDocument ownerDocument, string nodeName = "sage:address" ) : XmlElement
GetContextProperty ( SageContext context, string propName, string propKey ) : string
GetDataParam ( SageContext context ) : string
GetFormParam ( SageContext context ) : string
GetQueryParam ( SageContext context ) : string
GetRequestParam ( SageContext context ) : string
GetSessionParam ( SageContext context ) : string
GetVariable ( SageContext context ) : string
IIf ( SageContext context ) : string
IsNull ( SageContext context ) : string
ProcessBaseHrefNode ( SageContext context, XmlNode node ) : XmlNode
ProcessContextIfNode ( SageContext context, XmlNode node ) : XmlNode
ProcessContextSwitchNode ( SageContext context, XmlNode switchNode ) : XmlNode
ProcessContextValueNode ( SageContext context, XmlNode node ) : XmlNode
ProcessSageVersionNode ( SageContext context, XmlNode node ) : XmlNode
ResolvePathVariable ( SageContext context, string variable ) : string
SubstituteExtensionPath ( ) : bool

메소드 상세

ExpandUrl() 공개 메소드

Returns an absolute URL, fully expanded to a path within the current application.
/// If the argument is empty or a null. ///
public ExpandUrl ( string path ) : string
path string The path to expand
리턴 string

GetProjectVariable() 공개 메소드

Gets the value of the project variable with the specified name.
public GetProjectVariable ( string name, string locale = null ) : string
name string The name of the variable.
locale string Optional locale to use to select the variable value. If omitted the current will be used
리턴 string

MapPath() 공개 메소드

Maps the supplied relative path to the actual, physical location of the file.
If the specified path is an absolute path, no translation will be done.
/// is null or empty. ///
public MapPath ( string path ) : string
path string The path to map
리턴 string

Parse() 공개 메소드

public Parse ( XmlElement element ) : void
element System.Xml.XmlElement
리턴 void

ProcessNode() 공개 메소드

Recursively processes all nodes in the specified node, applying any registered text and node handlers on the way, and returns the result.
public ProcessNode ( XmlNode node ) : XmlNode
node System.Xml.XmlNode The node to process.
리턴 System.Xml.XmlNode

ProcessText() 공개 메소드

Replaces any function or variable expression with the result of invoking it's corresponding handler function.
public ProcessText ( string text ) : string
text string The text to process.
리턴 string

SageContext() 공개 메소드

Initializes a new instance of the SageContext class, using the specified ControllerContext.
public SageContext ( ControllerContext controllerContext, ProjectConfiguration config = null ) : System
controllerContext ControllerContext The current to use to initialize this instance.
config Sage.Configuration.ProjectConfiguration The project configuration to use with this context instance.
리턴 System

SageContext() 공개 메소드

Initializes a new instance of the SageContext class, using the specified HttpContext.
public SageContext ( HttpContext httpContext, ProjectConfiguration config = null ) : System
httpContext System.Web.HttpContext The current to use to initialize this instance.
config Sage.Configuration.ProjectConfiguration The project configuration to use with this context instance.
리턴 System

SageContext() 공개 메소드

Initializes a new instance of the SageContext class, using the specified HttpContextBase and pathMapper.
public SageContext ( System.Web.HttpContextBase httpContext, string>.Func pathMapper, ProjectConfiguration config = null ) : System
httpContext System.Web.HttpContextBase The current to use to initialize this instance.
pathMapper string>.Func The function to use for resolving relative paths.
config Sage.Configuration.ProjectConfiguration The project configuration to use with this context instance.
리턴 System

SageContext() 공개 메소드

Initializes a new instance of the SageContext class, using the specified HttpContextBase.
public SageContext ( System.Web.HttpContextBase httpContext, ProjectConfiguration config = null ) : System
httpContext System.Web.HttpContextBase The current to use to initialize this instance.
config Sage.Configuration.ProjectConfiguration The project configuration to use with this context instance.
리턴 System

SageContext() 공개 메소드

Initializes a new instance of the SageContext class, using the specified httpContext, categoryName and pathMapper.
public SageContext ( System.Web.HttpContextBase httpContext, string categoryName, string>.Func pathMapper, ProjectConfiguration config = null ) : System
httpContext System.Web.HttpContextBase The current HTTP context.
categoryName string The category to set for this instance.
pathMapper string>.Func The function to use to map relative paths to absolute.
config Sage.Configuration.ProjectConfiguration The project configuration to use with this context instance.
리턴 System

SageContext() 공개 메소드

Initializes a new instance of the SageContext class, using the specified httpContext and categoryName.
public SageContext ( System.Web.HttpContextBase httpContext, string categoryName, ProjectConfiguration config = null ) : System
httpContext System.Web.HttpContextBase The current HTTP context.
categoryName string The category to set for this instance.
config Sage.Configuration.ProjectConfiguration The project configuration to use with this context instance.
리턴 System

SageContext() 공개 메소드

Initializes a new instance of the SageContext class, using the specified httpContext and categoryName.
public SageContext ( System.Web.HttpContextBase httpContext, string categoryName, string localeName, ProjectConfiguration config = null ) : System
httpContext System.Web.HttpContextBase The current HTTP context.
categoryName string The category to set for this instance.
localeName string The locale to set for this instance.
config Sage.Configuration.ProjectConfiguration The project configuration to use with this context instance.
리턴 System

SageContext() 공개 메소드

Initializes a new instance of the SageContext class, using an existing context instance.
public SageContext ( SageContext context, ProjectConfiguration config = null, string>.Func pathMapper = null ) : System
context SageContext An existing to use to initialize this instance.
config Sage.Configuration.ProjectConfiguration The project configuration to use with this context instance.
pathMapper string>.Func The function to use for resolving relative paths.
리턴 System

SageContext() 공개 메소드

Initializes a new instance of the SageContext class, using an existing context instance.
public SageContext ( SageContext context, string categoryName, ProjectConfiguration config = null ) : System
context SageContext An existing to use to initialize this instance.
categoryName string The name of the category to set on the new context.
config Sage.Configuration.ProjectConfiguration The project configuration to use with this context instance.
리턴 System

ToXml() 공개 메소드

Gets an XmlElement that contains information about this context.
/// is null. ///
public ToXml ( XmlDocument ownerDocument ) : XmlElement
ownerDocument System.Xml.XmlDocument The to use to create the element.
리턴 System.Xml.XmlElement