IDEExpert: Added sample method with strongly typed actions

This commit is contained in:
danieleteti 2016-09-05 16:19:15 +02:00
parent d8abc1590a
commit 4d9f7ada28
3 changed files with 25 additions and 16 deletions

View File

@ -96,8 +96,8 @@ sLineBreak +
// 0 - Unit Name // 0 - Unit Name
// 1 - Class Name // 1 - Class Name
// 2 - Index Method - Interface // 2 - Sample Methods - Interface
// 3 - Index Method - Implementation // 3 - Sample Methods - Implementation
// 4 - Action Filters - Interface // 4 - Action Filters - Interface
// 5 - Action Filters - Implementation // 5 - Action Filters - Implementation
sControllerUnit = 'unit %0:s;' + sLineBreak + sControllerUnit = 'unit %0:s;' + sLineBreak +
@ -126,7 +126,11 @@ sLineBreak +
sIndexMethodIntf = sIndexMethodIntf =
' [MVCPath(''/'')]' + sLineBreak + ' [MVCPath(''/'')]' + sLineBreak +
' [MVCHTTPMethod([httpGET])]' + sLineBreak + ' [MVCHTTPMethod([httpGET])]' + sLineBreak +
' procedure Index;' + sLineBreak; ' procedure Index;' + sLineBreak + sLineBreak +
' [MVCPath(''/hellos/($FirstName)'')]' + sLineBreak +
' [MVCHTTPMethod([httpGET])]' + sLineBreak +
' procedure GetSpecializedHello(const FirstName: String);' + sLineBreak;
// 0 - Class Name // 0 - Class Name
sIndexMethodImpl = sIndexMethodImpl =
@ -135,7 +139,12 @@ sLineBreak +
' //use Context property to access to the HTTP request and response ' + sLineBreak + ' //use Context property to access to the HTTP request and response ' + sLineBreak +
' Render(''Hello World'');' + sLineBreak + ' Render(''Hello World'');' + sLineBreak +
sLineBreak + sLineBreak +
'end;'; 'end;' + sLineBreak + sLineBreak +
'procedure %0:s.GetSpecializedHello(const FirstName: String);' + sLineBreak +
'begin' + sLineBreak +
' Render(''Hello '' + FirstName);' + sLineBreak +
sLineBreak +
'end;' + sLineBreak;
sActionFiltersIntf = sActionFiltersIntf =
' procedure OnBeforeAction(Context: TWebContext; const AActionName: string; var Handled: Boolean); override;' + sLineBreak + ' procedure OnBeforeAction(Context: TWebContext; const AActionName: string; var Handled: Boolean); override;' + sLineBreak +

View File

@ -65,7 +65,7 @@ object frmDMVCNewProject: TfrmDMVCNewProject
Width = 288 Width = 288
Height = 17 Height = 17
Anchors = [akLeft, akTop, akRight] Anchors = [akLeft, akTop, akRight]
Caption = 'Create Index Method' Caption = 'Create Index And Sample Methods'
Checked = True Checked = True
State = cbChecked State = cbChecked
TabOrder = 0 TabOrder = 0

View File

@ -205,7 +205,16 @@
<Overwrite>true</Overwrite> <Overwrite>true</Overwrite>
</Platform> </Platform>
</DeployFile> </DeployFile>
<DeployClass Name="ProjectiOSDeviceResourceRules"/> <DeployClass Name="DependencyModule">
<Platform Name="Win32">
<Operation>0</Operation>
<Extensions>.dll;.bpl</Extensions>
</Platform>
<Platform Name="OSX32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
</DeployClass>
<DeployClass Name="ProjectOSXResource"> <DeployClass Name="ProjectOSXResource">
<Platform Name="OSX32"> <Platform Name="OSX32">
<RemoteDir>Contents\Resources</RemoteDir> <RemoteDir>Contents\Resources</RemoteDir>
@ -517,16 +526,7 @@
<Operation>1</Operation> <Operation>1</Operation>
</Platform> </Platform>
</DeployClass> </DeployClass>
<DeployClass Name="DependencyModule"> <DeployClass Name="ProjectiOSDeviceResourceRules"/>
<Platform Name="Win32">
<Operation>0</Operation>
<Extensions>.dll;.bpl</Extensions>
</Platform>
<Platform Name="OSX32">
<Operation>1</Operation>
<Extensions>.dylib</Extensions>
</Platform>
</DeployClass>
<ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/> <ProjectRoot Platform="Win64" Name="$(PROJECTNAME)"/>
<ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/> <ProjectRoot Platform="iOSDevice64" Name="$(PROJECTNAME).app"/>
<ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/> <ProjectRoot Platform="iOSDevice32" Name="$(PROJECTNAME).app"/>