Skip to content

Commit 2cc5086

Browse files
committed
Angular / ASP.NET
- multiple SignalR outputs fixed
1 parent 68885a6 commit 2cc5086

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+22305
-14
lines changed

Common/Command/RawCommand.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
using System.Collections.Generic;
2+
using System.Diagnostics;
23

34
namespace KY.Generator.Command
45
{
6+
[DebuggerDisplay("{Name}*{Parameters.Count}")]
57
public class RawCommand
68
{
79
public string Name { get; }
@@ -12,4 +14,4 @@ public RawCommand(string name)
1214
this.Name = name;
1315
}
1416
}
15-
}
17+
}

Reflection/Commands/AnnotationCommand.cs

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ public override IGeneratorCommandResult Run()
4848
List<RawCommandParameter> globalParameters = this.Parameters.GetType().GetProperties()
4949
.Where(x => x.GetCustomAttribute<GeneratorGlobalParameterAttribute>() != null)
5050
.Select(x =>
51-
new RawCommandParameter(x.Name, x.GetMethod.Invoke(this.Parameters, null)?.ToString())
51+
new RawCommandParameter(x.Name, x.GetMethod.Invoke(this.Parameters, null)?.ToString())
5252
)
5353
.Where(x => !string.IsNullOrEmpty(x.Value))
5454
.ToList();
@@ -74,23 +74,27 @@ public override IGeneratorCommandResult Run()
7474
}
7575
return command;
7676
}));
77-
foreach (IGeneratorCommandAdditionalParameterAttribute additionalParameterAttribute in attributes.OfType<IGeneratorCommandAdditionalParameterAttribute>())
77+
}
78+
if (commands.Count == 0)
79+
{
80+
continue;
81+
}
82+
foreach (IGeneratorCommandAdditionalParameterAttribute additionalParameterAttribute in attributes.OfType<IGeneratorCommandAdditionalParameterAttribute>())
83+
{
84+
foreach (AttributeCommandConfiguration additionalParameters in additionalParameterAttribute.Commands)
7885
{
79-
foreach (AttributeCommandConfiguration additionalParameters in additionalParameterAttribute.Commands)
86+
foreach (RawCommand command in commands.Where(x => x.Name == additionalParameters.Command || additionalParameters.Command == "*"))
8087
{
81-
foreach (RawCommand command in commands.Where(x => x.Name == additionalParameters.Command || additionalParameters.Command == "*"))
82-
{
83-
command.Parameters.AddRange(additionalParameters.Parameters.Select(RawCommandParameter.Parse));
84-
}
88+
command.Parameters.AddRange(additionalParameters.Parameters.Select(RawCommandParameter.Parse));
8589
}
8690
}
87-
foreach (RawCommand command in commands)
91+
}
92+
foreach (RawCommand command in commands)
93+
{
94+
IGeneratorCommandResult commandResult = commandRunner.Run(command);
95+
if (!commandResult.Success)
8896
{
89-
IGeneratorCommandResult commandResult = commandRunner.Run(command);
90-
if (!commandResult.Success)
91-
{
92-
return commandResult;
93-
}
97+
return commandResult;
9498
}
9599
}
96100
this.resolver.Get<IEnvironment>().TransferObjects.AddIfNotExists(commandResolver.Get<List<ITransferObject>>());

Tests/SignalR.sln

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SignalR", "SignalR\SignalR.csproj", "{4FCCBE11-98E3-40AC-9646-D806BBFBA631}"
4+
EndProject
5+
Global
6+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
7+
Debug|Any CPU = Debug|Any CPU
8+
Release|Any CPU = Release|Any CPU
9+
EndGlobalSection
10+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
11+
{4FCCBE11-98E3-40AC-9646-D806BBFBA631}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
12+
{4FCCBE11-98E3-40AC-9646-D806BBFBA631}.Debug|Any CPU.Build.0 = Debug|Any CPU
13+
{4FCCBE11-98E3-40AC-9646-D806BBFBA631}.Release|Any CPU.ActiveCfg = Release|Any CPU
14+
{4FCCBE11-98E3-40AC-9646-D806BBFBA631}.Release|Any CPU.Build.0 = Release|Any CPU
15+
EndGlobalSection
16+
EndGlobal

Tests/SignalR/.gitignore

Lines changed: 231 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,231 @@
1+
## Ignore Visual Studio temporary files, build results, and
2+
## files generated by popular Visual Studio add-ons.
3+
4+
# User-specific files
5+
*.suo
6+
*.user
7+
*.userosscache
8+
*.sln.docstates
9+
10+
# User-specific files (MonoDevelop/Xamarin Studio)
11+
*.userprefs
12+
13+
# Build results
14+
[Dd]ebug/
15+
[Dd]ebugPublic/
16+
[Rr]elease/
17+
[Rr]eleases/
18+
x64/
19+
x86/
20+
build/
21+
bld/
22+
bin/
23+
Bin/
24+
obj/
25+
Obj/
26+
27+
# Visual Studio 2015 cache/options directory
28+
.vs/
29+
30+
# MSTest test Results
31+
[Tt]est[Rr]esult*/
32+
[Bb]uild[Ll]og.*
33+
34+
# NUNIT
35+
*.VisualState.xml
36+
TestResult.xml
37+
38+
# Build Results of an ATL Project
39+
[Dd]ebugPS/
40+
[Rr]eleasePS/
41+
dlldata.c
42+
43+
*_i.c
44+
*_p.c
45+
*_i.h
46+
*.ilk
47+
*.meta
48+
*.obj
49+
*.pch
50+
*.pdb
51+
*.pgc
52+
*.pgd
53+
*.rsp
54+
*.sbr
55+
*.tlb
56+
*.tli
57+
*.tlh
58+
*.tmp
59+
*.tmp_proj
60+
*.log
61+
*.vspscc
62+
*.vssscc
63+
.builds
64+
*.pidb
65+
*.svclog
66+
*.scc
67+
68+
# Chutzpah Test files
69+
_Chutzpah*
70+
71+
# Visual C++ cache files
72+
ipch/
73+
*.aps
74+
*.ncb
75+
*.opendb
76+
*.opensdf
77+
*.sdf
78+
*.cachefile
79+
80+
# Visual Studio profiler
81+
*.psess
82+
*.vsp
83+
*.vspx
84+
*.sap
85+
86+
# TFS 2012 Local Workspace
87+
$tf/
88+
89+
# Guidance Automation Toolkit
90+
*.gpState
91+
92+
# ReSharper is a .NET coding add-in
93+
_ReSharper*/
94+
*.[Rr]e[Ss]harper
95+
*.DotSettings.user
96+
97+
# JustCode is a .NET coding add-in
98+
.JustCode
99+
100+
# TeamCity is a build add-in
101+
_TeamCity*
102+
103+
# DotCover is a Code Coverage Tool
104+
*.dotCover
105+
106+
# NCrunch
107+
_NCrunch_*
108+
.*crunch*.local.xml
109+
nCrunchTemp_*
110+
111+
# MightyMoose
112+
*.mm.*
113+
AutoTest.Net/
114+
115+
# Web workbench (sass)
116+
.sass-cache/
117+
118+
# Installshield output folder
119+
[Ee]xpress/
120+
121+
# DocProject is a documentation generator add-in
122+
DocProject/buildhelp/
123+
DocProject/Help/*.HxT
124+
DocProject/Help/*.HxC
125+
DocProject/Help/*.hhc
126+
DocProject/Help/*.hhk
127+
DocProject/Help/*.hhp
128+
DocProject/Help/Html2
129+
DocProject/Help/html
130+
131+
# Click-Once directory
132+
publish/
133+
134+
# Publish Web Output
135+
*.[Pp]ublish.xml
136+
*.azurePubxml
137+
# TODO: Comment the next line if you want to checkin your web deploy settings
138+
# but database connection strings (with potential passwords) will be unencrypted
139+
*.pubxml
140+
*.publishproj
141+
142+
# NuGet Packages
143+
*.nupkg
144+
# The packages folder can be ignored because of Package Restore
145+
**/packages/*
146+
# except build/, which is used as an MSBuild target.
147+
!**/packages/build/
148+
# Uncomment if necessary however generally it will be regenerated when needed
149+
#!**/packages/repositories.config
150+
151+
# Microsoft Azure Build Output
152+
csx/
153+
*.build.csdef
154+
155+
# Microsoft Azure Emulator
156+
ecf/
157+
rcf/
158+
159+
# Microsoft Azure ApplicationInsights config file
160+
ApplicationInsights.config
161+
162+
# Windows Store app package directory
163+
AppPackages/
164+
BundleArtifacts/
165+
166+
# Visual Studio cache files
167+
# files ending in .cache can be ignored
168+
*.[Cc]ache
169+
# but keep track of directories ending in .cache
170+
!*.[Cc]ache/
171+
172+
# Others
173+
ClientBin/
174+
~$*
175+
*~
176+
*.dbmdl
177+
*.dbproj.schemaview
178+
*.pfx
179+
*.publishsettings
180+
orleans.codegen.cs
181+
182+
/node_modules
183+
184+
# RIA/Silverlight projects
185+
Generated_Code/
186+
187+
# Backup & report files from converting an old project file
188+
# to a newer Visual Studio version. Backup files are not needed,
189+
# because we have git ;-)
190+
_UpgradeReport_Files/
191+
Backup*/
192+
UpgradeLog*.XML
193+
UpgradeLog*.htm
194+
195+
# SQL Server files
196+
*.mdf
197+
*.ldf
198+
199+
# Business Intelligence projects
200+
*.rdl.data
201+
*.bim.layout
202+
*.bim_*.settings
203+
204+
# Microsoft Fakes
205+
FakesAssemblies/
206+
207+
# GhostDoc plugin setting file
208+
*.GhostDoc.xml
209+
210+
# Node.js Tools for Visual Studio
211+
.ntvs_analysis.dat
212+
213+
# Visual Studio 6 build log
214+
*.plg
215+
216+
# Visual Studio 6 workspace options file
217+
*.opt
218+
219+
# Visual Studio LightSwitch build output
220+
**/*.HTMLClient/GeneratedArtifacts
221+
**/*.DesktopClient/GeneratedArtifacts
222+
**/*.DesktopClient/ModelManifest.xml
223+
**/*.Server/GeneratedArtifacts
224+
**/*.Server/ModelManifest.xml
225+
_Pvt_Extensions
226+
227+
# Paket dependency manager
228+
.paket/paket.exe
229+
230+
# FAKE - F# Make
231+
.fake/

Tests/SignalR/AssemblyInfo.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
using KY.Generator;
2+
3+
[assembly:GenerateNoHeader]
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
# This file is used by the build system to adjust CSS and JS output to support the specified browsers below.
2+
# For additional information regarding the format and rule options, please see:
3+
# https://github.com/browserslist/browserslist#queries
4+
5+
# For the full list of supported browsers by the Angular framework, please see:
6+
# https://angular.io/guide/browser-support
7+
8+
# You can see what browsers were selected by your queries by running:
9+
# npx browserslist
10+
11+
last 1 Chrome version
12+
last 1 Firefox version
13+
last 2 Edge major versions
14+
last 2 Safari major versions
15+
last 2 iOS major versions
16+
Firefox ESR
17+
not IE 11 # Angular supports IE 11 only as an opt-in. To opt-in, remove the 'not' prefix on this line.
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Editor configuration, see http://editorconfig.org
2+
root = true
3+
4+
[*]
5+
charset = utf-8
6+
indent_style = space
7+
indent_size = 2
8+
insert_final_newline = true
9+
trim_trailing_whitespace = true
10+
11+
[*.ts]
12+
quote_type = single
13+
14+
[*.md]
15+
max_line_length = off
16+
trim_trailing_whitespace = false
17+
18+
[*.{razor,cshtml}]
19+
charset = utf-8-bom

Tests/SignalR/ClientApp/.gitignore

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
# See http://help.github.com/ignore-files/ for more about ignoring files.
2+
3+
# compiled output
4+
/dist
5+
/dist-server
6+
/tmp
7+
/out-tsc
8+
9+
# dependencies
10+
/node_modules
11+
12+
# IDEs and editors
13+
/.idea
14+
.project
15+
.classpath
16+
.c9/
17+
*.launch
18+
.settings/
19+
*.sublime-workspace
20+
21+
# IDE - VSCode
22+
.vscode/*
23+
!.vscode/settings.json
24+
!.vscode/tasks.json
25+
!.vscode/launch.json
26+
!.vscode/extensions.json
27+
28+
# misc
29+
/.sass-cache
30+
/connect.lock
31+
/coverage
32+
/libpeerconnection.log
33+
npm-debug.log
34+
yarn-error.log
35+
testem.log
36+
/typings
37+
38+
# System Files
39+
.DS_Store
40+
Thumbs.db

0 commit comments

Comments
 (0)