🎨 格式化代码

pull/22/head
Xuanye Wong 5 years ago
parent f689dce846
commit 99e4a5982f
  1. 138
      .gitignore
  2. 90
      .vscode/launch.json
  3. 16
      .vscode/solution-explorer/class.cs-template
  4. 4
      .vscode/solution-explorer/class.ts-template
  5. 18
      .vscode/solution-explorer/class.vb-template
  6. 4
      .vscode/solution-explorer/default.ts-template
  7. 16
      .vscode/solution-explorer/enum.cs-template
  8. 16
      .vscode/solution-explorer/interface.cs-template
  9. 4
      .vscode/solution-explorer/interface.ts-template
  10. 90
      .vscode/solution-explorer/template-list.json
  11. 28
      .vscode/tasks.json
  12. 42
      LICENSE
  13. 52
      samples/ASPNetCoreExecutor/Properties/launchSettings.json
  14. 34
      samples/ASPNetCoreExecutor/appsettings.json
  15. 28
      scripts/build.sh
  16. 36
      scripts/nuget.sh
  17. 34
      scripts/package.sh

138
.gitignore vendored

@ -1,70 +1,70 @@
# Misc folders # Misc folders
[Bb]in/ [Bb]in/
[Oo]bj/ [Oo]bj/
[Pp]ackages/ [Pp]ackages/
# Build related # Build related
tools/** tools/**
!tools/packages.config !tools/packages.config
## Ignore Visual Studio temporary files, build results, and ## Ignore Visual Studio temporary files, build results, and
## files generated by popular Visual Studio add-ons. ## files generated by popular Visual Studio add-ons.
# User-specific files # User-specific files
*.suo *.suo
*.user *.user
*.sln.docstates *.sln.docstates
*.sln.ide/ *.sln.ide/
*.userprefs *.userprefs
*.GhostDoc.xml *.GhostDoc.xml
# Build results # Build results
[Dd]ebug/ [Dd]ebug/
[Rr]elease/ [Rr]elease/
x64/ x64/
*_i.c *_i.c
*_p.c *_p.c
*.ilk *.ilk
*.meta *.meta
*.obj *.obj
*.pch *.pch
*.pdb *.pdb
*.pgc *.pgc
*.pgd *.pgd
*.rsp *.rsp
*.sbr *.sbr
*.tlb *.tlb
*.tli *.tli
*.tlh *.tlh
*.tmp *.tmp
*.log *.log
*.vspscc *.vspscc
*.vssscc *.vssscc
.builds .builds
# Visual Studio profiler # Visual Studio profiler
*.psess *.psess
*.vsp *.vsp
*.vspx *.vspx
# ReSharper is a .NET coding add-in # ReSharper is a .NET coding add-in
_ReSharper* _ReSharper*
# NCrunch # NCrunch
*.ncrunch* *.ncrunch*
.*crunch*.local.xml .*crunch*.local.xml
_NCrunch_* _NCrunch_*
artifacts/ artifacts/
# NuGet Packages Directory # NuGet Packages Directory
packages packages
# Windows # Windows
Thumbs.db Thumbs.db
# NUnit # NUnit
TestResult.xml TestResult.xml
.vs/ .vs/
.idea/ .idea/
doc/_site/ doc/_site/

@ -1,46 +1,46 @@
{ {
// Use IntelliSense to find out which attributes exist for C# debugging // Use IntelliSense to find out which attributes exist for C# debugging
// Use hover for the description of the existing attributes // Use hover for the description of the existing attributes
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md // For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"version": "0.2.0", "version": "0.2.0",
"configurations": [ "configurations": [
{ {
"name": ".NET Core Launch (web)", "name": ".NET Core Launch (web)",
"type": "coreclr", "type": "coreclr",
"request": "launch", "request": "launch",
"preLaunchTask": "build", "preLaunchTask": "build",
// If you have changed target frameworks, make sure to update the program path. // If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/samples/ASPNetCoreExecutor/bin/Debug/netcoreapp2.2/ASPNetCoreExecutor.dll", "program": "${workspaceFolder}/samples/ASPNetCoreExecutor/bin/Debug/netcoreapp2.2/ASPNetCoreExecutor.dll",
"args": [], "args": [],
"cwd": "${workspaceFolder}/samples/ASPNetCoreExecutor", "cwd": "${workspaceFolder}/samples/ASPNetCoreExecutor",
"stopAtEntry": false, "stopAtEntry": false,
"internalConsoleOptions": "openOnSessionStart", "internalConsoleOptions": "openOnSessionStart",
"launchBrowser": { "launchBrowser": {
"enabled": true, "enabled": true,
"args": "${auto-detect-url}", "args": "${auto-detect-url}",
"windows": { "windows": {
"command": "cmd.exe", "command": "cmd.exe",
"args": "/C start ${auto-detect-url}" "args": "/C start ${auto-detect-url}"
}, },
"osx": { "osx": {
"command": "open" "command": "open"
}, },
"linux": { "linux": {
"command": "xdg-open" "command": "xdg-open"
} }
}, },
"env": { "env": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
}, },
"sourceFileMap": { "sourceFileMap": {
"/Views": "${workspaceFolder}/Views" "/Views": "${workspaceFolder}/Views"
} }
}, },
{ {
"name": ".NET Core Attach", "name": ".NET Core Attach",
"type": "coreclr", "type": "coreclr",
"request": "attach", "request": "attach",
"processId": "${command:pickProcess}" "processId": "${command:pickProcess}"
} }
,] ,]
} }

@ -1,8 +1,8 @@
using System; using System;
namespace {{namespace}} namespace {{namespace}}
{ {
public class {{name}} public class {{name}}
{ {
} }
} }

@ -1,3 +1,3 @@
export class {{name}} { export class {{name}} {
} }

@ -1,9 +1,9 @@
Imports System Imports System
Namespace {{namespace}} Namespace {{namespace}}
Public Class {{name}} Public Class {{name}}
End Class End Class
End Namespace End Namespace

@ -1,3 +1,3 @@
export default {{name}} { export default {{name}} {
} }

@ -1,8 +1,8 @@
using System; using System;
namespace {{namespace}} namespace {{namespace}}
{ {
public enum {{name}} public enum {{name}}
{ {
} }
} }

@ -1,8 +1,8 @@
using System; using System;
namespace {{namespace}} namespace {{namespace}}
{ {
public interface {{name}} public interface {{name}}
{ {
} }
} }

@ -1,3 +1,3 @@
export interface {{name}} { export interface {{name}} {
} }

@ -1,46 +1,46 @@
{ {
"templates": [ "templates": [
{ {
"name": "Class", "name": "Class",
"extension": "cs", "extension": "cs",
"file": "./class.cs-template", "file": "./class.cs-template",
"parameters": "./template-parameters.js" "parameters": "./template-parameters.js"
}, },
{ {
"name": "Interface", "name": "Interface",
"extension": "cs", "extension": "cs",
"file": "./interface.cs-template", "file": "./interface.cs-template",
"parameters": "./template-parameters.js" "parameters": "./template-parameters.js"
}, },
{ {
"name": "Enum", "name": "Enum",
"extension": "cs", "extension": "cs",
"file": "./enum.cs-template", "file": "./enum.cs-template",
"parameters": "./template-parameters.js" "parameters": "./template-parameters.js"
}, },
{ {
"name": "Class", "name": "Class",
"extension": "ts", "extension": "ts",
"file": "./class.ts-template", "file": "./class.ts-template",
"parameters": "./template-parameters.js" "parameters": "./template-parameters.js"
}, },
{ {
"name": "Interface", "name": "Interface",
"extension": "ts", "extension": "ts",
"file": "./interface.ts-template", "file": "./interface.ts-template",
"parameters": "./template-parameters.js" "parameters": "./template-parameters.js"
}, },
{ {
"name": "Default", "name": "Default",
"extension": "ts", "extension": "ts",
"file": "./default.ts-template", "file": "./default.ts-template",
"parameters": "./template-parameters.js" "parameters": "./template-parameters.js"
}, },
{ {
"name": "Class", "name": "Class",
"extension": "vb", "extension": "vb",
"file": "./class.vb-template", "file": "./class.vb-template",
"parameters": "./template-parameters.js" "parameters": "./template-parameters.js"
} }
] ]
} }

28
.vscode/tasks.json vendored

@ -1,15 +1,15 @@
{ {
"version": "2.0.0", "version": "2.0.0",
"tasks": [ "tasks": [
{ {
"label": "build", "label": "build",
"command": "dotnet", "command": "dotnet",
"type": "process", "type": "process",
"args": [ "args": [
"build", "build",
"${workspaceFolder}/samples/ASPNetCoreExecutor/ASPNetCoreExecutor.csproj" "${workspaceFolder}/samples/ASPNetCoreExecutor/ASPNetCoreExecutor.csproj"
], ],
"problemMatcher": "$msCompile" "problemMatcher": "$msCompile"
} }
] ]
} }

@ -1,21 +1,21 @@
MIT License MIT License
Copyright (c) 2019 xuanye wong Copyright (c) 2019 xuanye wong
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software. copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE. SOFTWARE.

@ -1,27 +1,27 @@
{ {
"iisSettings": { "iisSettings": {
"windowsAuthentication": false, "windowsAuthentication": false,
"anonymousAuthentication": true, "anonymousAuthentication": true,
"iisExpress": { "iisExpress": {
"applicationUrl": "http://localhost:60087/", "applicationUrl": "http://localhost:60087/",
"sslPort": 0 "sslPort": 0
} }
}, },
"profiles": { "profiles": {
"IIS Express": { "IIS Express": {
"commandName": "IISExpress", "commandName": "IISExpress",
"launchBrowser": true, "launchBrowser": true,
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
} }
}, },
"ASPNetCoreExecutor": { "ASPNetCoreExecutor": {
"commandName": "Project", "commandName": "Project",
"launchBrowser": true, "launchBrowser": true,
"environmentVariables": { "environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development" "ASPNETCORE_ENVIRONMENT": "Development"
}, },
"applicationUrl": "http://localhost:5000/" "applicationUrl": "http://localhost:5000/"
} }
} }
} }

@ -1,17 +1,17 @@
{ {
"Logging": { "Logging": {
"LogLevel": { "LogLevel": {
"Default": "Information" "Default": "Information"
} }
}, },
"xxlJob": { "xxlJob": {
"adminAddresses": "http://127.0.0.1:8080/xxl-job-admin", "adminAddresses": "http://127.0.0.1:8080/xxl-job-admin",
"appName": "xxl-job-executor-dotnet", "appName": "xxl-job-executor-dotnet",
"specialBindAddress": "127.0.0.1", "specialBindAddress": "127.0.0.1",
"port": 5000, "port": 5000,
"autoRegistry": true, "autoRegistry": true,
"accessToken": "", "accessToken": "",
"logRetentionDays": 30 "logRetentionDays": 30
} }
} }

@ -1,14 +1,14 @@
set -ex set -ex
cd $(dirname $0)/../ cd $(dirname $0)/../
artifactsFolder="./artifacts" artifactsFolder="./artifacts"
if [ -d $artifactsFolder ]; then if [ -d $artifactsFolder ]; then
rm -R $artifactsFolder rm -R $artifactsFolder
fi fi
mkdir -p $artifactsFolder mkdir -p $artifactsFolder
dotnet restore ./DotXxlJob.sln dotnet restore ./DotXxlJob.sln
dotnet build ./DotXxlJob.sln -c Release dotnet build ./DotXxlJob.sln -c Release

@ -1,18 +1,18 @@
set -ex set -ex
cd $(dirname $0)/../ cd $(dirname $0)/../
artifactsFolder="./artifacts" artifactsFolder="./artifacts"
if [ -d $artifactsFolder ]; then if [ -d $artifactsFolder ]; then
rm -R $artifactsFolder rm -R $artifactsFolder
fi fi
mkdir -p $artifactsFolder mkdir -p $artifactsFolder
dotnet build ./src/DotXxlJob.Core/DotXxlJob.Core.csproj -c Release dotnet build ./src/DotXxlJob.Core/DotXxlJob.Core.csproj -c Release
dotnet pack ./src/DotXxlJob.Core/DotXxlJob.Core.csproj -c Release -o $artifactsFolder dotnet pack ./src/DotXxlJob.Core/DotXxlJob.Core.csproj -c Release -o $artifactsFolder
dotnet nuget push $artifactsFolder/DotXxlJob.Core.*.nupkg -k $NUGET_KEY -s https://www.nuget.org dotnet nuget push $artifactsFolder/DotXxlJob.Core.*.nupkg -k $NUGET_KEY -s https://www.nuget.org

@ -1,17 +1,17 @@
set -ex set -ex
cd $(dirname $0)/../ cd $(dirname $0)/../
artifactsFolder="./artifacts" artifactsFolder="./artifacts"
if [ -d $artifactsFolder ]; then if [ -d $artifactsFolder ]; then
rm -R $artifactsFolder rm -R $artifactsFolder
fi fi
mkdir -p $artifactsFolder mkdir -p $artifactsFolder
dotnet restore ./DotXxlJob.sln dotnet restore ./DotXxlJob.sln
dotnet build ./DotXxlJob.sln -c Release dotnet build ./DotXxlJob.sln -c Release
dotnet pack ./src/DotXxlJob.Core/DotXxlJob.Core.csproj -c Release -o $artifactsFolder dotnet pack ./src/DotXxlJob.Core/DotXxlJob.Core.csproj -c Release -o $artifactsFolder

Loading…
Cancel
Save