Skip to content
This repository was archived by the owner on Apr 11, 2021. It is now read-only.

Commit 499f38e

Browse files
csproj chapter #37
1 parent 3e10e2c commit 499f38e

File tree

116 files changed

+24929
-0
lines changed

Some content is hidden

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

116 files changed

+24929
-0
lines changed

csproj/.vscode/launch.json

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
{
2+
"version": "0.2.0",
3+
"configurations": [
4+
{
5+
"name": ".NET Core Launch (console)",
6+
"type": "coreclr",
7+
"request": "launch",
8+
"preLaunchTask": "build",
9+
"program": "${workspaceRoot}\\HelloWorld\\bin\\Debug\\netcoreapp1.1\\HelloWorld.dll",
10+
"args": [],
11+
"cwd": "${workspaceRoot}\\HelloWorld",
12+
"console": "internalConsole",
13+
"stopAtEntry": false,
14+
"internalConsoleOptions": "openOnSessionStart"
15+
},
16+
{
17+
"name": ".NET Core Attach",
18+
"type": "coreclr",
19+
"request": "attach",
20+
"processId": "${command:pickProcess}"
21+
}
22+
]
23+
}

csproj/.vscode/tasks.json

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"version": "0.1.0",
3+
"command": "dotnet",
4+
"isShellCommand": true,
5+
"args": [],
6+
"tasks": [
7+
{
8+
"taskName": "build",
9+
"args": [
10+
"${workspaceRoot}\\HelloWorld\\HelloWorld.csproj"
11+
],
12+
"isBuildCommand": true,
13+
"problemMatcher": "$msCompile"
14+
}
15+
]
16+
}

csproj/HelloAngular/.gitignore

Lines changed: 246 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,246 @@
1+
/Properties/launchSettings.json
2+
3+
## Ignore Visual Studio temporary files, build results, and
4+
## files generated by popular Visual Studio add-ons.
5+
6+
# User-specific files
7+
*.suo
8+
*.user
9+
*.userosscache
10+
*.sln.docstates
11+
12+
# User-specific files (MonoDevelop/Xamarin Studio)
13+
*.userprefs
14+
15+
# Build results
16+
[Dd]ebug/
17+
[Dd]ebugPublic/
18+
[Rr]elease/
19+
[Rr]eleases/
20+
x64/
21+
x86/
22+
build/
23+
bld/
24+
bin/
25+
Bin/
26+
obj/
27+
Obj/
28+
29+
# Visual Studio 2015 cache/options directory
30+
.vs/
31+
/wwwroot/dist/**
32+
/ClientApp/dist/**
33+
34+
# Workaround for https://github.com/aspnet/JavaScriptServices/issues/235
35+
!/wwwroot/dist/_placeholder.txt
36+
!/ClientApp/dist/_placeholder.txt
37+
38+
39+
# MSTest test Results
40+
[Tt]est[Rr]esult*/
41+
[Bb]uild[Ll]og.*
42+
43+
# NUNIT
44+
*.VisualState.xml
45+
TestResult.xml
46+
47+
# Build Results of an ATL Project
48+
[Dd]ebugPS/
49+
[Rr]eleasePS/
50+
dlldata.c
51+
52+
# DNX
53+
project.lock.json
54+
artifacts/
55+
56+
*_i.c
57+
*_p.c
58+
*_i.h
59+
*.ilk
60+
*.meta
61+
*.obj
62+
*.pch
63+
*.pdb
64+
*.pgc
65+
*.pgd
66+
*.rsp
67+
*.sbr
68+
*.tlb
69+
*.tli
70+
*.tlh
71+
*.tmp
72+
*.tmp_proj
73+
*.log
74+
*.vspscc
75+
*.vssscc
76+
.builds
77+
*.pidb
78+
*.svclog
79+
*.scc
80+
81+
# Chutzpah Test files
82+
_Chutzpah*
83+
84+
# Visual C++ cache files
85+
ipch/
86+
*.aps
87+
*.ncb
88+
*.opendb
89+
*.opensdf
90+
*.sdf
91+
*.cachefile
92+
93+
# Visual Studio profiler
94+
*.psess
95+
*.vsp
96+
*.vspx
97+
*.sap
98+
99+
# TFS 2012 Local Workspace
100+
$tf/
101+
102+
# Guidance Automation Toolkit
103+
*.gpState
104+
105+
# ReSharper is a .NET coding add-in
106+
_ReSharper*/
107+
*.[Rr]e[Ss]harper
108+
*.DotSettings.user
109+
110+
# JustCode is a .NET coding add-in
111+
.JustCode
112+
113+
# TeamCity is a build add-in
114+
_TeamCity*
115+
116+
# DotCover is a Code Coverage Tool
117+
*.dotCover
118+
119+
# NCrunch
120+
_NCrunch_*
121+
.*crunch*.local.xml
122+
nCrunchTemp_*
123+
124+
# MightyMoose
125+
*.mm.*
126+
AutoTest.Net/
127+
128+
# Web workbench (sass)
129+
.sass-cache/
130+
131+
# Installshield output folder
132+
[Ee]xpress/
133+
134+
# DocProject is a documentation generator add-in
135+
DocProject/buildhelp/
136+
DocProject/Help/*.HxT
137+
DocProject/Help/*.HxC
138+
DocProject/Help/*.hhc
139+
DocProject/Help/*.hhk
140+
DocProject/Help/*.hhp
141+
DocProject/Help/Html2
142+
DocProject/Help/html
143+
144+
# Click-Once directory
145+
publish/
146+
147+
# Publish Web Output
148+
*.[Pp]ublish.xml
149+
*.azurePubxml
150+
# TODO: Comment the next line if you want to checkin your web deploy settings
151+
# but database connection strings (with potential passwords) will be unencrypted
152+
*.pubxml
153+
*.publishproj
154+
155+
# NuGet Packages
156+
*.nupkg
157+
# The packages folder can be ignored because of Package Restore
158+
**/packages/*
159+
# except build/, which is used as an MSBuild target.
160+
!**/packages/build/
161+
# Uncomment if necessary however generally it will be regenerated when needed
162+
#!**/packages/repositories.config
163+
164+
# Microsoft Azure Build Output
165+
csx/
166+
*.build.csdef
167+
168+
# Microsoft Azure Emulator
169+
ecf/
170+
rcf/
171+
172+
# Microsoft Azure ApplicationInsights config file
173+
ApplicationInsights.config
174+
175+
# Windows Store app package directory
176+
AppPackages/
177+
BundleArtifacts/
178+
179+
# Visual Studio cache files
180+
# files ending in .cache can be ignored
181+
*.[Cc]ache
182+
# but keep track of directories ending in .cache
183+
!*.[Cc]ache/
184+
185+
# Others
186+
ClientBin/
187+
~$*
188+
*~
189+
*.dbmdl
190+
*.dbproj.schemaview
191+
*.pfx
192+
*.publishsettings
193+
orleans.codegen.cs
194+
195+
/node_modules
196+
197+
/yarn.lock
198+
199+
# RIA/Silverlight projects
200+
Generated_Code/
201+
202+
# Backup & report files from converting an old project file
203+
# to a newer Visual Studio version. Backup files are not needed,
204+
# because we have git ;-)
205+
_UpgradeReport_Files/
206+
Backup*/
207+
UpgradeLog*.XML
208+
UpgradeLog*.htm
209+
210+
# SQL Server files
211+
*.mdf
212+
*.ldf
213+
214+
# Business Intelligence projects
215+
*.rdl.data
216+
*.bim.layout
217+
*.bim_*.settings
218+
219+
# Microsoft Fakes
220+
FakesAssemblies/
221+
222+
# GhostDoc plugin setting file
223+
*.GhostDoc.xml
224+
225+
# Node.js Tools for Visual Studio
226+
.ntvs_analysis.dat
227+
228+
# Visual Studio 6 build log
229+
*.plg
230+
231+
# Visual Studio 6 workspace options file
232+
*.opt
233+
234+
# Visual Studio LightSwitch build output
235+
**/*.HTMLClient/GeneratedArtifacts
236+
**/*.DesktopClient/GeneratedArtifacts
237+
**/*.DesktopClient/ModelManifest.xml
238+
**/*.Server/GeneratedArtifacts
239+
**/*.Server/ModelManifest.xml
240+
_Pvt_Extensions
241+
242+
# Paket dependency manager
243+
.paket/paket.exe
244+
245+
# FAKE - F# Make
246+
.fake/
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
import { NgModule } from '@angular/core';
2+
import { RouterModule } from '@angular/router';
3+
import { UniversalModule } from 'angular2-universal';
4+
import { AppComponent } from './components/app/app.component'
5+
import { NavMenuComponent } from './components/navmenu/navmenu.component';
6+
import { HomeComponent } from './components/home/home.component';
7+
import { FetchDataComponent } from './components/fetchdata/fetchdata.component';
8+
import { CounterComponent } from './components/counter/counter.component';
9+
10+
@NgModule({
11+
bootstrap: [ AppComponent ],
12+
declarations: [
13+
AppComponent,
14+
NavMenuComponent,
15+
CounterComponent,
16+
FetchDataComponent,
17+
HomeComponent
18+
],
19+
imports: [
20+
UniversalModule, // Must be first import. This automatically imports BrowserModule, HttpModule, and JsonpModule too.
21+
RouterModule.forRoot([
22+
{ path: '', redirectTo: 'home', pathMatch: 'full' },
23+
{ path: 'home', component: HomeComponent },
24+
{ path: 'counter', component: CounterComponent },
25+
{ path: 'fetch-data', component: FetchDataComponent },
26+
{ path: '**', redirectTo: 'home' }
27+
])
28+
]
29+
})
30+
export class AppModule {
31+
}
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
@media (max-width: 767px) {
2+
/* On small screens, the nav menu spans the full width of the screen. Leave a space for it. */
3+
.body-content {
4+
padding-top: 50px;
5+
}
6+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<div class='container-fluid'>
2+
<div class='row'>
3+
<div class='col-sm-3'>
4+
<nav-menu></nav-menu>
5+
</div>
6+
<div class='col-sm-9 body-content'>
7+
<router-outlet></router-outlet>
8+
</div>
9+
</div>
10+
</div>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
import { Component } from '@angular/core';
2+
3+
@Component({
4+
selector: 'app',
5+
templateUrl: './app.component.html',
6+
styleUrls: ['./app.component.css']
7+
})
8+
export class AppComponent {
9+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<h1>Counter</h1>
2+
3+
<p>This is a simple example of an Angular 2 component.</p>
4+
5+
<p>Current count: <strong>{{ currentCount }}</strong></p>
6+
7+
<button (click)="incrementCounter()">Increment</button>
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/// <reference path="../../../../node_modules/@types/jasmine/index.d.ts" />
2+
import { assert } from 'chai';
3+
import { CounterComponent } from './counter.component';
4+
import { TestBed, async, ComponentFixture } from '@angular/core/testing';
5+
6+
let fixture: ComponentFixture<CounterComponent>;
7+
8+
describe('Counter component', () => {
9+
beforeEach(() => {
10+
TestBed.configureTestingModule({ declarations: [CounterComponent] });
11+
fixture = TestBed.createComponent(CounterComponent);
12+
fixture.detectChanges();
13+
});
14+
15+
it('should display a title', async(() => {
16+
const titleText = fixture.nativeElement.querySelector('h1').textContent;
17+
expect(titleText).toEqual('Counter');
18+
}));
19+
20+
it('should start with count 0, then increments by 1 when clicked', async(() => {
21+
const countElement = fixture.nativeElement.querySelector('strong');
22+
expect(countElement.textContent).toEqual('0');
23+
24+
const incrementButton = fixture.nativeElement.querySelector('button');
25+
incrementButton.click();
26+
fixture.detectChanges();
27+
expect(countElement.textContent).toEqual('1');
28+
}));
29+
});

0 commit comments

Comments
 (0)