This commit is contained in:
Sanchime 2022-05-02 23:01:32 +08:00
parent 824e672b48
commit bd9142b451
34 changed files with 128 additions and 234 deletions

31
.gitignore vendored Normal file
View File

@ -0,0 +1,31 @@
# 编译目录
bin/
obj/
# Nuget包目录
packages/
# 编译结果
[Dd]ebug/
[Rr]elease/
x64/
*_i.c
*_p.c
*.ilk
*.meta
*.obj
*.pch
*.pdb
*.pgc
*.pgd
*.rsp
*.sbr
*.tlb
*.tli
*.tlh
*.tmp
*.log
*.vspscc
*.vssscc
.builds

View File

@ -0,0 +1,5 @@
namespace {{namespace}};
public class {{name}}
{
}

View File

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

View File

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

View File

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

View File

@ -0,0 +1,5 @@
namespace {{namespace}};
public enum {{name}}
{
}

View File

@ -0,0 +1,5 @@
namespace {{namespace}};
public interface {{name}}
{
}

View File

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

View File

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

View File

@ -0,0 +1,17 @@
var path = require("path");
module.exports = function(filename, projectPath, folderPath) {
var namespace = "Unknown";
if (projectPath) {
namespace = path.basename(projectPath, path.extname(projectPath));
if (folderPath) {
namespace += "." + folderPath.replace(path.dirname(projectPath), "").substring(1).replace(/[\\\/]/g, ".");
}
namespace = namespace.replace(/[\\\-]/g, "_");
}
return {
namespace: namespace,
name: path.basename(filename, path.extname(filename))
}
};

View File

@ -28,7 +28,7 @@ public static class TaskExtension
public static async Task<R> Apply<T, R>(this Task<Func<T, R>> @this, Task<T> task)
=> (await @this.ConfigureAwait(false))(await task.ConfigureAwait(false));
public static Task<Func<T2, R>> Apply<T1, T2, R>(this Task<Func<T1, T2, R>> @this, Task<T1> task)
public static Task<Func<T2, R>> Apply<T1, T2, R>(this Task<Func<T1, T2, R>> @this, Task<T1> task)
=> @this.Map(CurryingExtension.Curry).Apply(task);

View File

@ -1,23 +0,0 @@
{
"runtimeTarget": {
"name": ".NETCoreApp,Version=v7.0",
"signature": ""
},
"compilationOptions": {},
"targets": {
".NETCoreApp,Version=v7.0": {
"Sanchime.Functional/1.0.0": {
"runtime": {
"Sanchime.Functional.dll": {}
}
}
}
},
"libraries": {
"Sanchime.Functional/1.0.0": {
"type": "project",
"serviceable": false,
"sha512": ""
}
}
}

View File

@ -1,4 +0,0 @@
// <autogenerated />
using System;
using System.Reflection;
[assembly: global::System.Runtime.Versioning.TargetFrameworkAttribute(".NETCoreApp,Version=v7.0", FrameworkDisplayName = "")]

View File

@ -1,22 +0,0 @@
//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated.
// </auto-generated>
//------------------------------------------------------------------------------
using System;
using System.Reflection;
[assembly: System.Reflection.AssemblyCompanyAttribute("Sanchime.Functional")]
[assembly: System.Reflection.AssemblyConfigurationAttribute("Debug")]
[assembly: System.Reflection.AssemblyFileVersionAttribute("1.0.0.0")]
[assembly: System.Reflection.AssemblyInformationalVersionAttribute("1.0.0")]
[assembly: System.Reflection.AssemblyProductAttribute("Sanchime.Functional")]
[assembly: System.Reflection.AssemblyTitleAttribute("Sanchime.Functional")]
[assembly: System.Reflection.AssemblyVersionAttribute("1.0.0.0")]
// 由 MSBuild WriteCodeFragment 类生成。

View File

@ -1 +0,0 @@
1132520a32de11ff302b7fe56da971f09e88fb78

View File

@ -1,10 +0,0 @@
is_global = true
build_property.TargetFramework = net7.0
build_property.TargetPlatformMinVersion =
build_property.UsingMicrosoftNETSdkWeb =
build_property.ProjectTypeGuids =
build_property.InvariantGlobalization =
build_property.PlatformNeutralAssembly =
build_property._SupportedPlatformList = Linux,macOS,Windows
build_property.RootNamespace = Sanchime.Functional
build_property.ProjectDir = /home/sanchime/桌面/Program/C#/Sanchime/Sanchime.Functional/

View File

@ -1,8 +0,0 @@
// <auto-generated/>
global using global::System;
global using global::System.Collections.Generic;
global using global::System.IO;
global using global::System.Linq;
global using global::System.Net.Http;
global using global::System.Threading;
global using global::System.Threading.Tasks;

View File

@ -1 +0,0 @@
14ff64154b5d7a38f0fe0b94f6fa9545005d4e6f

View File

@ -1,12 +0,0 @@
/home/sanchime/桌面/Program/C#/Sanchime/Sanchime.Functional/obj/Debug/net7.0/Sanchime.Functional.csproj.AssemblyReference.cache
/home/sanchime/桌面/Program/C#/Sanchime/Sanchime.Functional/obj/Debug/net7.0/Sanchime.Functional.GeneratedMSBuildEditorConfig.editorconfig
/home/sanchime/桌面/Program/C#/Sanchime/Sanchime.Functional/obj/Debug/net7.0/Sanchime.Functional.AssemblyInfoInputs.cache
/home/sanchime/桌面/Program/C#/Sanchime/Sanchime.Functional/obj/Debug/net7.0/Sanchime.Functional.AssemblyInfo.cs
/home/sanchime/桌面/Program/C#/Sanchime/Sanchime.Functional/obj/Debug/net7.0/Sanchime.Functional.csproj.CoreCompileInputs.cache
/home/sanchime/桌面/Program/C#/Sanchime/Sanchime.Functional/bin/Debug/net7.0/Sanchime.Functional.deps.json
/home/sanchime/桌面/Program/C#/Sanchime/Sanchime.Functional/bin/Debug/net7.0/Sanchime.Functional.dll
/home/sanchime/桌面/Program/C#/Sanchime/Sanchime.Functional/bin/Debug/net7.0/Sanchime.Functional.pdb
/home/sanchime/桌面/Program/C#/Sanchime/Sanchime.Functional/obj/Debug/net7.0/Sanchime.Functional.dll
/home/sanchime/桌面/Program/C#/Sanchime/Sanchime.Functional/obj/Debug/net7.0/refint/Sanchime.Functional.dll
/home/sanchime/桌面/Program/C#/Sanchime/Sanchime.Functional/obj/Debug/net7.0/Sanchime.Functional.pdb
/home/sanchime/桌面/Program/C#/Sanchime/Sanchime.Functional/obj/Debug/net7.0/ref/Sanchime.Functional.dll

View File

@ -1,60 +0,0 @@
{
"format": 1,
"restore": {
"/home/sanchime/桌面/Program/C#/Sanchime/Sanchime.Functional/Sanchime.Functional.csproj": {}
},
"projects": {
"/home/sanchime/桌面/Program/C#/Sanchime/Sanchime.Functional/Sanchime.Functional.csproj": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "/home/sanchime/桌面/Program/C#/Sanchime/Sanchime.Functional/Sanchime.Functional.csproj",
"projectName": "Sanchime.Functional",
"projectPath": "/home/sanchime/桌面/Program/C#/Sanchime/Sanchime.Functional/Sanchime.Functional.csproj",
"packagesPath": "/home/sanchime/.nuget/packages/",
"outputPath": "/home/sanchime/桌面/Program/C#/Sanchime/Sanchime.Functional/obj/",
"projectStyle": "PackageReference",
"configFilePaths": [
"/home/sanchime/.nuget/NuGet/NuGet.Config"
],
"originalTargetFrameworks": [
"net7.0"
],
"sources": {
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net7.0": {
"targetAlias": "net7.0",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"net7.0": {
"targetAlias": "net7.0",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "/home/sanchime/dotnet/sdk/7.0.100-preview.3.22179.4/RuntimeIdentifierGraph.json"
}
}
}
}
}

View File

@ -1,15 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup Condition="'$(ExcludeRestorePackageImports)' != 'true'">
<RestoreSuccess Condition="'$(RestoreSuccess)' == ''">True</RestoreSuccess>
<RestoreTool Condition="'$(RestoreTool)' == ''">NuGet</RestoreTool>
<ProjectAssetsFile Condition="'$(ProjectAssetsFile)' == ''">$(MSBuildThisFileDirectory)project.assets.json</ProjectAssetsFile>
<NuGetPackageRoot Condition="'$(NuGetPackageRoot)' == ''">/home/sanchime/.nuget/packages/</NuGetPackageRoot>
<NuGetPackageFolders Condition="'$(NuGetPackageFolders)' == ''">/home/sanchime/.nuget/packages/</NuGetPackageFolders>
<NuGetProjectStyle Condition="'$(NuGetProjectStyle)' == ''">PackageReference</NuGetProjectStyle>
<NuGetToolVersion Condition="'$(NuGetToolVersion)' == ''">6.2.0</NuGetToolVersion>
</PropertyGroup>
<ItemGroup Condition="'$(ExcludeRestorePackageImports)' != 'true'">
<SourceRoot Include="/home/sanchime/.nuget/packages/" />
</ItemGroup>
</Project>

View File

@ -1,2 +0,0 @@
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<Project ToolsVersion="14.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003" />

View File

@ -1,65 +0,0 @@
{
"version": 3,
"targets": {
"net7.0": {}
},
"libraries": {},
"projectFileDependencyGroups": {
"net7.0": []
},
"packageFolders": {
"/home/sanchime/.nuget/packages/": {}
},
"project": {
"version": "1.0.0",
"restore": {
"projectUniqueName": "/home/sanchime/桌面/Program/C#/Sanchime/Sanchime.Functional/Sanchime.Functional.csproj",
"projectName": "Sanchime.Functional",
"projectPath": "/home/sanchime/桌面/Program/C#/Sanchime/Sanchime.Functional/Sanchime.Functional.csproj",
"packagesPath": "/home/sanchime/.nuget/packages/",
"outputPath": "/home/sanchime/桌面/Program/C#/Sanchime/Sanchime.Functional/obj/",
"projectStyle": "PackageReference",
"configFilePaths": [
"/home/sanchime/.nuget/NuGet/NuGet.Config"
],
"originalTargetFrameworks": [
"net7.0"
],
"sources": {
"https://api.nuget.org/v3/index.json": {}
},
"frameworks": {
"net7.0": {
"targetAlias": "net7.0",
"projectReferences": {}
}
},
"warningProperties": {
"warnAsError": [
"NU1605"
]
}
},
"frameworks": {
"net7.0": {
"targetAlias": "net7.0",
"imports": [
"net461",
"net462",
"net47",
"net471",
"net472",
"net48"
],
"assetTargetFallback": true,
"warn": true,
"frameworkReferences": {
"Microsoft.NETCore.App": {
"privateAssets": "all"
}
},
"runtimeIdentifierGraphPath": "/home/sanchime/dotnet/sdk/7.0.100-preview.3.22179.4/RuntimeIdentifierGraph.json"
}
}
}
}

View File

@ -1,8 +0,0 @@
{
"version": 2,
"dgSpecHash": "SFlPh821qi4GkLKqdQvlF3w70bJfiHdxPTcWjQz6sHNJrETehv6TShnFcPyYahMOhHW73n97cu5NcnOrJNHiSw==",
"success": true,
"projectFilePath": "/home/sanchime/桌面/Program/C#/Sanchime/Sanchime.Functional/Sanchime.Functional.csproj",
"expectedPackageFiles": [],
"logs": []
}

View File

@ -1 +0,0 @@
"restore":{"projectUniqueName":"/home/sanchime/桌面/Program/C#/Sanchime/Sanchime.Functional/Sanchime.Functional.csproj","projectName":"Sanchime.Functional","projectPath":"/home/sanchime/桌面/Program/C#/Sanchime/Sanchime.Functional/Sanchime.Functional.csproj","outputPath":"/home/sanchime/桌面/Program/C#/Sanchime/Sanchime.Functional/obj/","projectStyle":"PackageReference","originalTargetFrameworks":["net7.0"],"sources":{"https://api.nuget.org/v3/index.json":{}},"frameworks":{"net7.0":{"targetAlias":"net7.0","projectReferences":{}}},"warningProperties":{"warnAsError":["NU1605"]}}"frameworks":{"net7.0":{"targetAlias":"net7.0","imports":["net461","net462","net47","net471","net472","net48"],"assetTargetFallback":true,"warn":true,"frameworkReferences":{"Microsoft.NETCore.App":{"privateAssets":"all"}},"runtimeIdentifierGraphPath":"/home/sanchime/dotnet/sdk/7.0.100-preview.3.22179.4/RuntimeIdentifierGraph.json"}}

View File

@ -1 +0,0 @@
16514907543498126