Skip to content
This repository was archived by the owner on Sep 1, 2022. It is now read-only.

Commit db4d96d

Browse files
committed
Add project files.
0 parents  commit db4d96d

35 files changed

+2540
-0
lines changed

.gitattributes

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
###############################################################################
2+
# Set default behavior to automatically normalize line endings.
3+
###############################################################################
4+
* text=auto
5+
6+
###############################################################################
7+
# Set default behavior for command prompt diff.
8+
#
9+
# This is need for earlier builds of msysgit that does not have it on by
10+
# default for csharp files.
11+
# Note: This is only used by command line
12+
###############################################################################
13+
#*.cs diff=csharp
14+
15+
###############################################################################
16+
# Set the merge driver for project and solution files
17+
#
18+
# Merging from the command prompt will add diff markers to the files if there
19+
# are conflicts (Merging from VS is not affected by the settings below, in VS
20+
# the diff markers are never inserted). Diff markers may cause the following
21+
# file extensions to fail to load in VS. An alternative would be to treat
22+
# these files as binary and thus will always conflict and require user
23+
# intervention with every merge. To do so, just uncomment the entries below
24+
###############################################################################
25+
#*.sln merge=binary
26+
#*.csproj merge=binary
27+
#*.vbproj merge=binary
28+
#*.vcxproj merge=binary
29+
#*.vcproj merge=binary
30+
#*.dbproj merge=binary
31+
#*.fsproj merge=binary
32+
#*.lsproj merge=binary
33+
#*.wixproj merge=binary
34+
#*.modelproj merge=binary
35+
#*.sqlproj merge=binary
36+
#*.wwaproj merge=binary
37+
38+
###############################################################################
39+
# behavior for image files
40+
#
41+
# image files are treated as binary by default.
42+
###############################################################################
43+
#*.jpg binary
44+
#*.png binary
45+
#*.gif binary
46+
47+
###############################################################################
48+
# diff behavior for common document formats
49+
#
50+
# Convert binary document formats to text before diffing them. This feature
51+
# is only available from the command line. Turn it on by uncommenting the
52+
# entries below.
53+
###############################################################################
54+
#*.doc diff=astextplain
55+
#*.DOC diff=astextplain
56+
#*.docx diff=astextplain
57+
#*.DOCX diff=astextplain
58+
#*.dot diff=astextplain
59+
#*.DOT diff=astextplain
60+
#*.pdf diff=astextplain
61+
#*.PDF diff=astextplain
62+
#*.rtf diff=astextplain
63+
#*.RTF diff=astextplain

.gitignore

Lines changed: 191 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,191 @@
1+
## Ignore Visual Studio temporary files, build results, and
2+
## files generated by popular Visual Studio add-ons.
3+
4+
.vs
5+
6+
# User-specific files
7+
*.suo
8+
*.user
9+
*.sln.docstates
10+
11+
# Build results
12+
[Dd]ebug/
13+
[Dd]ebugPublic/
14+
[Rr]elease/
15+
x64/
16+
build/
17+
bld/
18+
[Bb]in/
19+
[Oo]bj/
20+
21+
# Roslyn cache directories
22+
*.ide/
23+
24+
# MSTest test Results
25+
[Tt]est[Rr]esult*/
26+
[Bb]uild[Ll]og.*
27+
28+
#NUNIT
29+
*.VisualState.xml
30+
TestResult.xml
31+
32+
# Build Results of an ATL Project
33+
[Dd]ebugPS/
34+
[Rr]eleasePS/
35+
dlldata.c
36+
37+
*_i.c
38+
*_p.c
39+
*_i.h
40+
*.ilk
41+
*.meta
42+
*.obj
43+
*.pch
44+
*.pdb
45+
*.pgc
46+
*.pgd
47+
*.rsp
48+
*.sbr
49+
*.tlb
50+
*.tli
51+
*.tlh
52+
*.tmp
53+
*.tmp_proj
54+
*.log
55+
*.vspscc
56+
*.vssscc
57+
.builds
58+
*.pidb
59+
*.svclog
60+
*.scc
61+
62+
# Chutzpah Test files
63+
_Chutzpah*
64+
65+
# Visual C++ cache files
66+
ipch/
67+
*.aps
68+
*.ncb
69+
*.opensdf
70+
*.sdf
71+
*.cachefile
72+
73+
# Visual Studio profiler
74+
*.psess
75+
*.vsp
76+
*.vspx
77+
78+
# TFS 2012 Local Workspace
79+
$tf/
80+
81+
# Guidance Automation Toolkit
82+
*.gpState
83+
84+
# ReSharper is a .NET coding add-in
85+
_ReSharper*/
86+
*.[Rr]e[Ss]harper
87+
*.DotSettings.user
88+
89+
# JustCode is a .NET coding addin-in
90+
.JustCode
91+
92+
# TeamCity is a build add-in
93+
_TeamCity*
94+
95+
# DotCover is a Code Coverage Tool
96+
*.dotCover
97+
98+
# NCrunch
99+
_NCrunch_*
100+
.*crunch*.local.xml
101+
102+
# MightyMoose
103+
*.mm.*
104+
AutoTest.Net/
105+
106+
# Web workbench (sass)
107+
.sass-cache/
108+
109+
# Installshield output folder
110+
[Ee]xpress/
111+
112+
# DocProject is a documentation generator add-in
113+
DocProject/buildhelp/
114+
DocProject/Help/*.HxT
115+
DocProject/Help/*.HxC
116+
DocProject/Help/*.hhc
117+
DocProject/Help/*.hhk
118+
DocProject/Help/*.hhp
119+
DocProject/Help/Html2
120+
DocProject/Help/html
121+
122+
# Click-Once directory
123+
publish/
124+
125+
# Publish Web Output
126+
*.[Pp]ublish.xml
127+
*.azurePubxml
128+
## TODO: Comment the next line if you want to checkin your
129+
## web deploy settings but do note that will include unencrypted
130+
## passwords
131+
#*.pubxml
132+
133+
# NuGet Packages Directory
134+
packages
135+
## TODO: If the tool you use requires repositories.config
136+
## uncomment the next line
137+
#!packages/repositories.config
138+
139+
# Enable "build/" folder in the NuGet Packages folder since
140+
# NuGet packages use it for MSBuild targets.
141+
# This line needs to be after the ignore of the build folder
142+
# (and the packages folder if the line above has been uncommented)
143+
!packages/build/
144+
145+
# Windows Azure Build Output
146+
csx/
147+
*.build.csdef
148+
149+
# Windows Store app package directory
150+
AppPackages/
151+
152+
# Others
153+
sql/
154+
*.Cache
155+
ClientBin/
156+
[Ss]tyle[Cc]op.*
157+
~$*
158+
*~
159+
*.dbmdl
160+
*.dbproj.schemaview
161+
*.pfx
162+
*.publishsettings
163+
node_modules/
164+
165+
# RIA/Silverlight projects
166+
Generated_Code/
167+
168+
# Backup & report files from converting an old project file
169+
# to a newer Visual Studio version. Backup files are not needed,
170+
# because we have git ;-)
171+
_UpgradeReport_Files/
172+
Backup*/
173+
UpgradeLog*.XML
174+
UpgradeLog*.htm
175+
176+
# SQL Server files
177+
*.mdf
178+
*.ldf
179+
180+
# Business Intelligence projects
181+
*.rdl.data
182+
*.bim.layout
183+
*.bim_*.settings
184+
185+
# Microsoft Fakes
186+
FakesAssemblies/
187+
188+
# LightSwitch generated files
189+
GeneratedArtifacts/
190+
_Pvt_Extensions/
191+
ModelManifest.xml

CopyrightCheck.ps1

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
param([string]$SrcRoot,
2+
[string]$TestRoot)
3+
4+
$rootDir = Split-Path $MyInvocation.MyCommand.Path
5+
$rootDir = [IO.Path]::GetFullPath($rootDir)
6+
7+
if(!$SrcRoot) {
8+
$SrcRoot = Join-Path $rootDir "src"
9+
}
10+
11+
if(!$TestRoot) {
12+
$TestRoot = Join-Path $rootDir "tests"
13+
}
14+
15+
$Header = "// ----------------------------------------------------------------------------
16+
// Copyright (c) Microsoft Corporation. All rights reserved.
17+
// ----------------------------------------------------------------------------"
18+
19+
function NeedsCopyright([string]$FileName) {
20+
# Skip designer files bin and org files
21+
if($FileName.Contains("Designer") -or $FileName.Contains("bin\") -or $FileName.Contains("obj\")) {
22+
return $false;
23+
}
24+
25+
# Check the first line
26+
$line = Get-Content $FileName -totalCount 1;
27+
28+
# Does it have the header?
29+
return !$line -or !$line.StartsWith("// ----------------------------------------------------------------------------")
30+
}
31+
32+
function Get-FilesWithoutCopyright([string]$Directory) {
33+
return Get-ChildItem $Directory -Recurse -Filter *.cs | Where-Object { NeedsCopyright $_.FullName } | Select-Object FullName
34+
}
35+
36+
function WriteWarnings([string]$Directory, $Files) {
37+
Write-Warning "There are $($Files.Length) files in '$Directory' without a copyright header:"
38+
if($Files.Length) {
39+
$Files | ForEach-Object { Write-Warning $_.FullName }
40+
}
41+
}
42+
43+
function FixCopyright([string]$FileName) {
44+
$lines = New-Object System.Collections.ArrayList(,(Get-Content $FileName))
45+
$lines.Insert(0, "")
46+
$lines.Insert(0, $Header)
47+
48+
$lines | Set-Content $FileName -Encoding UTF8
49+
}
50+
51+
$srcFilesWithoutCopyright = Get-FilesWithoutCopyright $SrcRoot
52+
53+
WriteWarnings $SrcRoot $srcFilesWithoutCopyright
54+
$srcFilesWithoutCopyright | ForEach-Object { FixCopyright $_.FullName }

0 commit comments

Comments
 (0)