CodeGen Intf Class

From RemObjects Wiki
Jump to: navigation, search

This is a Library topic for RemObjects SDK for .NET
This page is generated from external data, please do not update

NamespacesInterfacesClassesEnumsImplements

Contents

Overview

Generates CodeGen for the given RODL library.


Location


Class Methods

EmitReadComplexMethod   protected     (declared in CodeGen)



Oxygene:   class method EmitReadComplexMethod(library: RodlLibrary; entity: RodlStruct; isFramework: Boolean): CodeMemberMethod
C#:   static CodeMemberMethod EmitReadComplexMethod(RodlLibrary library, RodlStruct entity, Boolean isFramework)
VB:   Shared Function EmitReadComplexMethod(library As RodlLibrary, entity As RodlStruct, isFramework As Boolean) As CodeMemberMethod


Parameters:

  • library:
  • entity:
  • isFramework:


EmitWriteComplexMethod   protected     (declared in CodeGen)



Oxygene:   class method EmitWriteComplexMethod(library: RodlLibrary; entity: RodlStruct; isFramework: Boolean): CodeMemberMethod
C#:   static CodeMemberMethod EmitWriteComplexMethod(RodlLibrary library, RodlStruct entity, Boolean isFramework)
VB:   Shared Function EmitWriteComplexMethod(library As RodlLibrary, entity As RodlStruct, isFramework As Boolean) As CodeMemberMethod


Parameters:

  • library:
  • entity:
  • isFramework:


GenerateObfuscationExcludeAttribute (): CodeAttributeDeclaration   protected     (declared in CodeGen)

Generates System.Reflection.ObfuscationAttribute attribute. This attribute can be used to make some class or class member invulnerable to obfuscation in declarative way. This method sets by default Exclude and ApplyToMembers properties to TRUE.

[System.Reflection.ObfuscationAttribute(Exclude = true)]

Note: This attribute doesn't guarantee that marked stuff will not be obfuscated - it depends on your obfuscation tool. For example, Oxfuscator respects this attribute.


Oxygene:   class method GenerateObfuscationExcludeAttribute: CodeAttributeDeclaration
C#:   static CodeAttributeDeclaration GenerateObfuscationExcludeAttribute()
VB:   Shared Function GenerateObfuscationExcludeAttribute As CodeAttributeDeclaration


GenerateObfuscationExcludeAttribute (Boolean): CodeAttributeDeclaration   protected     (declared in CodeGen)

Generates System.Reflection.ObfuscationAttribute attribute. This attribute can be used to make some class or class member invulnerable to obfuscation in declarative way. This method sets by default Exclude property to TRUE and ApplyToMembers property is assigned from aApplyToMembers param.

[System.Reflection.ObfuscationAttribute(Exclude = true, ApplyToMembers = true)]

Note: This attribute doesn't guarantee that marked stuff will not be obfuscated - it depends on your obfuscation tool. For example, Oxfuscator respects this attribute.


Oxygene:   class method GenerateObfuscationExcludeAttribute(applyToMembers: Boolean): CodeAttributeDeclaration
C#:   static CodeAttributeDeclaration GenerateObfuscationExcludeAttribute(Boolean applyToMembers)
VB:   Shared Function GenerateObfuscationExcludeAttribute(applyToMembers As Boolean) As CodeAttributeDeclaration


Parameters:

  • applyToMembers:


GetReaderFunction (RodlLibrary, RodlParameter, Boolean): CodeExpression   protected     (declared in CodeGen)



Oxygene:   class method GetReaderFunction(library: RodlLibrary; entity: RodlParameter; isFramework: Boolean): CodeExpression
C#:   static CodeExpression GetReaderFunction(RodlLibrary library, RodlParameter entity, Boolean isFramework)
VB:   Shared Function GetReaderFunction(library As RodlLibrary, entity As RodlParameter, isFramework As Boolean) As CodeExpression


Parameters:

  • library:
  • entity:
  • isFramework:


GetReaderFunction (RodlLibrary, RodlParameter, String, Boolean): CodeExpression   protected     (declared in CodeGen)



Oxygene:   class method GetReaderFunction(library: RodlLibrary; entity: RodlParameter; variableName: String; isFramework: Boolean): CodeExpression
C#:   static CodeExpression GetReaderFunction(RodlLibrary library, RodlParameter entity, String variableName, Boolean isFramework)
VB:   Shared Function GetReaderFunction(library As RodlLibrary, entity As RodlParameter, variableName As String, isFramework As Boolean) As CodeExpression


Parameters:

  • library:
  • entity:
  • variableName:
  • isFramework:


GetSerializerReaderFunction   protected     (declared in CodeGen)



Oxygene:   class method GetSerializerReaderFunction(library: RodlLibrary; field: RodlField; isFramework: Boolean): CodeExpression
C#:   static CodeExpression GetSerializerReaderFunction(RodlLibrary library, RodlField field, Boolean isFramework)
VB:   Shared Function GetSerializerReaderFunction(library As RodlLibrary, field As RodlField, isFramework As Boolean) As CodeExpression


Parameters:

  • library:
  • field:
  • isFramework:


GetSerializerWriterFunction   protected     (declared in CodeGen)



Oxygene:   class method GetSerializerWriterFunction(library: RodlLibrary; field: RodlField; isFramework: Boolean): CodeMethodInvokeExpression
C#:   static CodeMethodInvokeExpression GetSerializerWriterFunction(RodlLibrary library, RodlField field, Boolean isFramework)
VB:   Shared Function GetSerializerWriterFunction(library As RodlLibrary, field As RodlField, isFramework As Boolean) As CodeMethodInvokeExpression


Parameters:

  • library:
  • field:
  • isFramework:


GetStreamingFormat   protected     (declared in CodeGen)

Returns streaming format for appropriate aDataType type (look at StreamingFormat enum).


Oxygene:   class method GetStreamingFormat(library: RodlLibrary; dataType: String): String
C#:   static String GetStreamingFormat(RodlLibrary library, String dataType)
VB:   Shared Function GetStreamingFormat(library As RodlLibrary, dataType As String) As String


Parameters:

  • library:
  • dataType:


GetStreamingFormatExpression   protected     (declared in CodeGen)

Generates code expression to get appropriate to aDataType StreamingFormat enum value.

RemObjects.SDK.StreamingFormat.Default


Oxygene:   class method GetStreamingFormatExpression(library: RodlLibrary; dataType: String): CodeExpression
C#:   static CodeExpression GetStreamingFormatExpression(RodlLibrary library, String dataType)
VB:   Shared Function GetStreamingFormatExpression(library As RodlLibrary, dataType As String) As CodeExpression


Parameters:

  • library:
  • dataType:


GetWriterFunction (RodlLibrary, RodlTypedEntity, Boolean): CodeMethodInvokeExpression   protected     (declared in CodeGen)



Oxygene:   class method GetWriterFunction(library: RodlLibrary; entity: RodlTypedEntity; isFramework: Boolean): CodeMethodInvokeExpression
C#:   static CodeMethodInvokeExpression GetWriterFunction(RodlLibrary library, RodlTypedEntity entity, Boolean isFramework)
VB:   Shared Function GetWriterFunction(library As RodlLibrary, entity As RodlTypedEntity, isFramework As Boolean) As CodeMethodInvokeExpression


Parameters:

  • library:
  • entity:
  • isFramework:


GetWriterFunction (RodlLibrary, RodlTypedEntity, String, Boolean): CodeMethodInvokeExpression   protected     (declared in CodeGen)



Oxygene:   class method GetWriterFunction(library: RodlLibrary; entity: RodlTypedEntity; variableName: String; isFramework: Boolean): CodeMethodInvokeExpression
C#:   static CodeMethodInvokeExpression GetWriterFunction(RodlLibrary library, RodlTypedEntity entity, String variableName, Boolean isFramework)
VB:   Shared Function GetWriterFunction(library As RodlLibrary, entity As RodlTypedEntity, variableName As String, isFramework As Boolean) As CodeMethodInvokeExpression


Parameters:

  • library:
  • entity:
  • variableName:
  • isFramework:


IsPrimitiveType   protected     (declared in CodeGen)



Oxygene:   class method IsPrimitiveType(dataType: String): Boolean
C#:   static Boolean IsPrimitiveType(String dataType)
VB:   Shared Function IsPrimitiveType(dataType As String) As Boolean


Parameters:

  • dataType:


ParamNeedsDisposer   protected     (declared in CodeGen)

Determines if it should to call Dispose method on specified aParam parameter when it's not needed. This all standard value types and strings.


Oxygene:   class method ParamNeedsDisposer(parameter: RodlParameter): Boolean
C#:   static Boolean ParamNeedsDisposer(RodlParameter parameter)
VB:   Shared Function ParamNeedsDisposer(parameter As RodlParameter) As Boolean


Parameters:

  • parameter:


ResolveDataTypeToTypeRef   protected     (declared in CodeGen)



Oxygene:   class method ResolveDataTypeToTypeRef(library: RodlLibrary; dataType: String; isFramework: Boolean): CodeTypeReference
C#:   static CodeTypeReference ResolveDataTypeToTypeRef(RodlLibrary library, String dataType, Boolean isFramework)
VB:   Shared Function ResolveDataTypeToTypeRef(library As RodlLibrary, dataType As String, isFramework As Boolean) As CodeTypeReference


Parameters:

  • library:
  • dataType:
  • isFramework:


WriteToFile     (declared in CodeGen)

Creates new file with code unit aUnit for specified .NET language provider aProvider.


Oxygene:   class method WriteToFile(unit: CodeCompileUnit; provider: CodeDomProvider; filename: String)
C#:   static void WriteToFile(CodeCompileUnit unit, CodeDomProvider provider, String filename)
VB:   Shared Sub WriteToFile(unit As CodeCompileUnit, provider As CodeDomProvider, filename As String)


Parameters:

  • unit:
  • provider:
  • filename:


WriteToStreamWriter     (declared in CodeGen)

Writes code unit aUnit for specified .NET language provider aProvider to aWriter stream.


Oxygene:   class method WriteToStreamWriter(unit: CodeCompileUnit; provider: CodeDomProvider; writer: TextWriter)
C#:   static void WriteToStreamWriter(CodeCompileUnit unit, CodeDomProvider provider, TextWriter writer)
VB:   Shared Sub WriteToStreamWriter(unit As CodeCompileUnit, provider As CodeDomProvider, writer As TextWriter)


Parameters:

  • unit:
  • provider:
  • writer:


WriteToString     (declared in CodeGen)

Returns string representation of .NET code unit aUnit for specified .NET language provider aProvider.


Oxygene:   class method WriteToString(unit: CodeCompileUnit; provider: CodeDomProvider): String
C#:   static String WriteToString(CodeCompileUnit unit, CodeDomProvider provider)
VB:   Shared Function WriteToString(unit As CodeCompileUnit, provider As CodeDomProvider) As String


Parameters:

  • unit:
  • provider:


Instance Methods

constructor



Oxygene:   constructor
C#:   constructor()
VB:   Sub New


AddDisposer   protected     (declared in CodeGen)

Generates code expression to call Add method for __ObjectDisposer object (instance of ObjectDisposer class) with input param generated from RODL parameter aParam (for example, you can look at any implementation of EventSinkInvoker) and add this expression to exsisting code statemets aStatements.


Oxygene:   method AddDisposer(statements: CodeStatementCollection; parameter: RodlParameter)
C#:   void AddDisposer(CodeStatementCollection statements, RodlParameter parameter)
VB:   Sub AddDisposer(statements As CodeStatementCollection, parameter As RodlParameter)


Parameters:

  • statements:
  • parameter:


AddMethodsForCustomAttibutesHandling   protected     (declared in CodeGen)

Generates three methods: GetAttributeName, GetAttributeValue and GetAttributeCount. GetAttributeName and GetAttributeValue gets one int input param what allows to get attribute's name and value accordingly by it's index in collection. GetAttributeCount has no input params and returns all attributes count.

void GetAttributeName(int aIndex)
{
    if (aIndex == 0) return "Default";
    if (aIndex == 1) return "AnotherAttributeName";
}


Oxygene:   method AddMethodsForCustomAttibutesHandling(attributes: AttributeCollection; typeDeclaration: CodeTypeDeclaration)
C#:   void AddMethodsForCustomAttibutesHandling(AttributeCollection attributes, CodeTypeDeclaration typeDeclaration)
VB:   Sub AddMethodsForCustomAttibutesHandling(attributes As AttributeCollection, typeDeclaration As CodeTypeDeclaration)


Parameters:

  • attributes:
  • typeDeclaration:


AddUsedNamespaces   protected     (declared in CodeGen)

Generates namespaces' importing statements which are needed by aRodl RODL library.


Oxygene:   method AddUsedNamespaces(targetNamespace: CodeNamespace; library: RodlLibrary)
C#:   void AddUsedNamespaces(CodeNamespace targetNamespace, RodlLibrary library)
VB:   Sub AddUsedNamespaces(targetNamespace As CodeNamespace, library As RodlLibrary)


Parameters:

  • targetNamespace:
  • library:


FindAncestor   protected     (declared in CodeGen)

Returns aEntity ancestor name or aDefault string if not found.


Oxygene:   method FindAncestor(targetNamespace: String; entity: RodlEntityWithAncestor; defaultAncestor: String; prefix: String; suffix: String): String
C#:   String FindAncestor(String targetNamespace, RodlEntityWithAncestor entity, String defaultAncestor, String prefix, String suffix)
VB:   Function FindAncestor(targetNamespace As String, entity As RodlEntityWithAncestor, defaultAncestor As String, prefix As String, suffix As String) As String


Parameters:

  • targetNamespace:
  • entity:
  • defaultAncestor:
  • prefix:
  • suffix:


GenerateActivator   protected     (declared in CodeGen)

Generates xxx_Activator class which is derived from ServiceActivator class and marks it with ActivatorAttribute attribute.

[RemObjects.SDK.Activator()]
[System.Reflection.ObfuscationAttribute(Exclude = true, ApplyToMembers = false)]
public class ADOService_Activator : RemObjects.SDK.Server.ServiceActivator
{
    public ADOService_Activator() :
        base()
    {
    }
    public override RemObjects.SDK.IROService CreateInstance()
    {
        return new ADOService();
    }
}


Oxygene:   method GenerateActivator(library: RodlLibrary; targetNamespace: String; codeNamespace: CodeNamespace; entity: RodlComplexEntity)
C#:   void GenerateActivator(RodlLibrary library, String targetNamespace, CodeNamespace codeNamespace, RodlComplexEntity entity)
VB:   Sub GenerateActivator(library As RodlLibrary, targetNamespace As String, codeNamespace As CodeNamespace, entity As RodlComplexEntity)


Parameters:

  • library:
  • targetNamespace:
  • codeNamespace:
  • entity:


GenerateCompileUnit



Oxygene:   method GenerateCompileUnit(library: RodlLibrary; targetNamespace: String; isFramework: Boolean): CodeCompileUnit
C#:   CodeCompileUnit GenerateCompileUnit(RodlLibrary library, String targetNamespace, Boolean isFramework)
VB:   Function GenerateCompileUnit(library As RodlLibrary, targetNamespace As String, isFramework As Boolean) As CodeCompileUnit


Parameters:

  • library:
  • targetNamespace:
  • isFramework:


RodlFileToString (String, String, CodeDomProvider, Boolean): String     (declared in CodeGen)



Oxygene:   method RodlFileToString(filename: String; targetNamespace: String; provider: CodeDomProvider; isFramework: Boolean): String
C#:   String RodlFileToString(String filename, String targetNamespace, CodeDomProvider provider, Boolean isFramework)
VB:   Function RodlFileToString(filename As String, targetNamespace As String, provider As CodeDomProvider, isFramework As Boolean) As String


Parameters:

  • filename:
  • targetNamespace:
  • provider:
  • isFramework:


RodlFileToString (String, String, String, String, Boolean): String     (declared in CodeGen)



Oxygene:   method RodlFileToString(filename: String; targetNamespace: String; providerAssembly: String; providerClass: String; isFramework: Boolean): String
C#:   String RodlFileToString(String filename, String targetNamespace, String providerAssembly, String providerClass, Boolean isFramework)
VB:   Function RodlFileToString(filename As String, targetNamespace As String, providerAssembly As String, providerClass As String, isFramework As Boolean) As String


Parameters:

  • filename:
  • targetNamespace:
  • providerAssembly:
  • providerClass:
  • isFramework:


See Also


Product: RemObjects SDK
Available Editions: RemObjects SDK for .NET, Xcode, Delphi, Java and JavaScript

GlossaryArticlesLibrarySamples

Personal tools
Namespaces

Variants
Actions
Navigation
products
platforms
special
Toolbox