C# Класс FlatRedBall.Glue.CodeGeneration.EventCodeGenerator

Наследование: ElementComponentCodeGenerator
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
AddStubsForCustomEvents ( IElement element ) : void
AddUsingStatementsToBlock ( ICodeBlock currentBlock ) : void
CreateEmptyCodeIfNecessary ( IElement currentElement, string fullFileName, bool forceRegenerateContents ) : void
FillWithCustomEventCode ( ICodeBlock currentBlock, EventResponseSave ers, string contents, IElement element ) : ICodeBlock
FillWithGeneratedEventCode ( ICodeBlock currentBlock, EventResponseSave ers, IElement element ) : ICodeBlock
GenerateActivity ( ICodeBlock codeBlock, IElement element ) : ICodeBlock
GenerateDestroy ( ICodeBlock codeBlock, IElement element ) : ICodeBlock
GenerateEventGeneratedFile ( IElement element ) : void
GenerateFields ( ICodeBlock codeBlock, IElement element ) : ICodeBlock
GenerateInitialize ( ICodeBlock codeBlock, IElement element ) : ICodeBlock
GeneratePostInitialize ( ICodeBlock codeBlock, IElement element ) : void
GetStartAndEndIndexForMethod ( ParsedMethod parsedMethod, string fileContents, int &startIndex, int &endIndex ) : void

Returns the start and end index in the argument fileContents of the entire method including the header of the method and the opening/closing brackets.

GetStartAndEndIndexForMethod ( string fileContents, string name, int &startIndex, int &endIndex ) : void
InjectTextForEventAndSaveCustomFile ( IElement currentElement, EventResponseSave eventResponseSave, string insideOfMethod ) : string

Injects the insideOfMethod into an event for the argument

ShouldGenerateEventsForVariable ( CustomVariable customVariable, IElement container ) : bool

Приватные методы

Метод Описание
GenerateAddToManagersBottomUp ( ICodeBlock codeBlock, IElement element ) : void
GenerateEventGeneratedCodeFile ( IElement element ) : ICodeBlock
GenerateEventRaisingCode ( ICodeBlock codeBlock, BeforeOrAfter beforeOrAfter, string variableName, IElement saveObject ) : void
GenerateEventsForVariable ( ICodeBlock codeBlock, string variableName, bool isEventNew = false ) : void
GenerateInitializeForEvent ( ICodeBlock codeBlock, IElement element, EventResponseSave ers ) : void
GetParsedClassFrom ( string fileName ) : ParsedClass
StripTypesFromArguments ( string argumentsWithTypes ) : string
TryGenerateEventsForVariable ( ICodeBlock codeBlock, CustomVariable customVariable, IElement container ) : void

Описание методов

AddStubsForCustomEvents() публичный статический Метод

public static AddStubsForCustomEvents ( IElement element ) : void
element IElement
Результат void

AddUsingStatementsToBlock() публичный статический Метод

public static AddUsingStatementsToBlock ( ICodeBlock currentBlock ) : void
currentBlock ICodeBlock
Результат void

CreateEmptyCodeIfNecessary() публичный статический Метод

public static CreateEmptyCodeIfNecessary ( IElement currentElement, string fullFileName, bool forceRegenerateContents ) : void
currentElement IElement
fullFileName string
forceRegenerateContents bool
Результат void

FillWithCustomEventCode() публичный статический Метод

public static FillWithCustomEventCode ( ICodeBlock currentBlock, EventResponseSave ers, string contents, IElement element ) : ICodeBlock
currentBlock ICodeBlock
ers FlatRedBall.Glue.Events.EventResponseSave
contents string
element IElement
Результат ICodeBlock

FillWithGeneratedEventCode() публичный статический Метод

public static FillWithGeneratedEventCode ( ICodeBlock currentBlock, EventResponseSave ers, IElement element ) : ICodeBlock
currentBlock ICodeBlock
ers FlatRedBall.Glue.Events.EventResponseSave
element IElement
Результат ICodeBlock

GenerateActivity() публичный Метод

public GenerateActivity ( ICodeBlock codeBlock, IElement element ) : ICodeBlock
codeBlock ICodeBlock
element IElement
Результат ICodeBlock

GenerateDestroy() публичный Метод

public GenerateDestroy ( ICodeBlock codeBlock, IElement element ) : ICodeBlock
codeBlock ICodeBlock
element IElement
Результат ICodeBlock

GenerateEventGeneratedFile() публичный статический Метод

public static GenerateEventGeneratedFile ( IElement element ) : void
element IElement
Результат void

GenerateFields() публичный Метод

public GenerateFields ( ICodeBlock codeBlock, IElement element ) : ICodeBlock
codeBlock ICodeBlock
element IElement
Результат ICodeBlock

GenerateInitialize() публичный Метод

public GenerateInitialize ( ICodeBlock codeBlock, IElement element ) : ICodeBlock
codeBlock ICodeBlock
element IElement
Результат ICodeBlock

GeneratePostInitialize() публичный статический Метод

public static GeneratePostInitialize ( ICodeBlock codeBlock, IElement element ) : void
codeBlock ICodeBlock
element IElement
Результат void

GetStartAndEndIndexForMethod() публичный статический Метод

Returns the start and end index in the argument fileContents of the entire method including the header of the method and the opening/closing brackets.
public static GetStartAndEndIndexForMethod ( ParsedMethod parsedMethod, string fileContents, int &startIndex, int &endIndex ) : void
parsedMethod FlatRedBall.Glue.Parsing.ParsedMethod The parsed method.
fileContents string The contents of the entire file.
startIndex int The found startIndex.
endIndex int The found endIndex which includes the closing bracket.
Результат void

GetStartAndEndIndexForMethod() публичный статический Метод

public static GetStartAndEndIndexForMethod ( string fileContents, string name, int &startIndex, int &endIndex ) : void
fileContents string
name string
startIndex int
endIndex int
Результат void

InjectTextForEventAndSaveCustomFile() публичный статический Метод

Injects the insideOfMethod into an event for the argument
public static InjectTextForEventAndSaveCustomFile ( IElement currentElement, EventResponseSave eventResponseSave, string insideOfMethod ) : string
currentElement IElement The IElement containing the EventResponseSave.
eventResponseSave FlatRedBall.Glue.Events.EventResponseSave The EventResponseSave which should have its contents set or replaced.
insideOfMethod string The inside of the methods to assign.
Результат string

ShouldGenerateEventsForVariable() публичный статический Метод

public static ShouldGenerateEventsForVariable ( CustomVariable customVariable, IElement container ) : bool
customVariable FlatRedBall.Glue.SaveClasses.CustomVariable
container IElement
Результат bool