C# Class MonoDevelop.Monobjc.CodeGeneration.BaseCodeBehindGenerator

Base implementation for a code-behind generator. As this implementation is language agnostic, language specific must be implemented in subclasses.
Inheritance: ICodeBehindGenerator
ファイルを表示 Open project: Monobjc/monobjc-monodevelop

Public Methods

Method Description
GenerateCodeBehindCode ( ProjectTypeCache cache, MonoDevelop.DesignerSupport.CodeBehindWriter writer, String className, IEnumerable descriptors ) : FilePath

Generates the design code for an Interface Builder file.

GenerateFrameworkLoadingCode ( ProjectTypeCache cache, String frameworks ) : FilePath

Generates the design code for framework loading.

Protected Methods

Method Description
GenerateActionExposedMethod ( String message, IType argumentType ) : CodeTypeMember

Generates the exposed method for an action.

GenerateActionPartialMethod ( String message, IType argumentType ) : CodeTypeMember

Generates the partial method for an action.

GenerateCodeCompileUnit ( ProjectTypeCache cache, String defaultNamespace, String className, IEnumerable enumerable ) : CodeCompileUnit
GenerateFrameworkLoadingcode ( String frameworks ) : IEnumerable

Generates the framework loading code which is language specific.

GenerateGetInstanceVariableStatement ( System.CodeDom.CodeThisReferenceExpression thisRef, CodeTypeReference typeRef, CodePrimitiveExpression nameRef ) : CodeStatement

Generates the "GetInstanceVariable" statement.

GenerateMethodName ( String selector ) : String

Generates the name of the method from a selector.

GenerateOutletProperty ( IType outletType, string name ) : CodeTypeMember

Generates an outlet property.

GenerateSetInstanceVariableStatement ( CodeThisReferenceExpression thisRef, CodeTypeReference typeRef, CodePrimitiveExpression nameRef, CodePropertySetValueReferenceExpression valueRef ) : CodeExpression

Generates the "SetInstanceVariable" expression.

IsDesignerRegionDelimiter ( String line, bool start ) : bool

Determines whether a line is a region delimiter.

Method Details

GenerateActionExposedMethod() protected method

Generates the exposed method for an action.
protected GenerateActionExposedMethod ( String message, IType argumentType ) : CodeTypeMember
message String The message.
argumentType IType Type of the argument.
return System.CodeDom.CodeTypeMember

GenerateActionPartialMethod() protected abstract method

Generates the partial method for an action.
protected abstract GenerateActionPartialMethod ( String message, IType argumentType ) : CodeTypeMember
message String The message.
argumentType IType Type of the argument.
return System.CodeDom.CodeTypeMember

GenerateCodeBehindCode() public method

Generates the design code for an Interface Builder file.
public GenerateCodeBehindCode ( ProjectTypeCache cache, MonoDevelop.DesignerSupport.CodeBehindWriter writer, String className, IEnumerable descriptors ) : FilePath
cache MonoDevelop.Monobjc.Utilities.ProjectTypeCache
writer MonoDevelop.DesignerSupport.CodeBehindWriter The writer.
className String Name of the class.
descriptors IEnumerable
return FilePath

GenerateCodeCompileUnit() protected method

protected GenerateCodeCompileUnit ( ProjectTypeCache cache, String defaultNamespace, String className, IEnumerable enumerable ) : CodeCompileUnit
cache MonoDevelop.Monobjc.Utilities.ProjectTypeCache
defaultNamespace String
className String
enumerable IEnumerable
return System.CodeDom.CodeCompileUnit

GenerateFrameworkLoadingCode() public method

Generates the design code for framework loading.
public GenerateFrameworkLoadingCode ( ProjectTypeCache cache, String frameworks ) : FilePath
cache MonoDevelop.Monobjc.Utilities.ProjectTypeCache
frameworks String The frameworks.
return FilePath

GenerateFrameworkLoadingcode() protected abstract method

Generates the framework loading code which is language specific.
protected abstract GenerateFrameworkLoadingcode ( String frameworks ) : IEnumerable
frameworks String The frameworks.
return IEnumerable

GenerateGetInstanceVariableStatement() protected method

Generates the "GetInstanceVariable" statement.
protected GenerateGetInstanceVariableStatement ( System.CodeDom.CodeThisReferenceExpression thisRef, CodeTypeReference typeRef, CodePrimitiveExpression nameRef ) : CodeStatement
thisRef System.CodeDom.CodeThisReferenceExpression This reference.
typeRef System.CodeDom.CodeTypeReference Type reference.
nameRef System.CodeDom.CodePrimitiveExpression Name reference.
return System.CodeDom.CodeStatement

GenerateMethodName() protected static method

Generates the name of the method from a selector.
protected static GenerateMethodName ( String selector ) : String
selector String The selector.
return String

GenerateOutletProperty() protected method

Generates an outlet property.
protected GenerateOutletProperty ( IType outletType, string name ) : CodeTypeMember
outletType IType Type of the outlet.
name string The name of the outlet.
return System.CodeDom.CodeTypeMember

GenerateSetInstanceVariableStatement() protected method

Generates the "SetInstanceVariable" expression.
protected GenerateSetInstanceVariableStatement ( CodeThisReferenceExpression thisRef, CodeTypeReference typeRef, CodePrimitiveExpression nameRef, CodePropertySetValueReferenceExpression valueRef ) : CodeExpression
thisRef CodeThisReferenceExpression This reference.
typeRef CodeTypeReference Type reference.
nameRef CodePrimitiveExpression Name reference.
valueRef CodePropertySetValueReferenceExpression Value reference
return CodeExpression

IsDesignerRegionDelimiter() protected abstract method

Determines whether a line is a region delimiter.
protected abstract IsDesignerRegionDelimiter ( String line, bool start ) : bool
line String The line.
start bool if set to true, check for a region start.
return bool