diff --git a/CSharpScript/Helper.cs b/CSharpScript/Helper.cs new file mode 100644 index 0000000..7ed7531 --- /dev/null +++ b/CSharpScript/Helper.cs @@ -0,0 +1,13 @@ +using System; + +namespace LinqPadUtil +{ + public static class Helper + { + public static void Print(string printMessage) + { + Console.WriteLine(printMessage); + } + + } +} diff --git a/LinqPadScript/MyUtil.linq b/LinqPadScript/MyUtil.linq new file mode 100644 index 0000000..e991d9f --- /dev/null +++ b/LinqPadScript/MyUtil.linq @@ -0,0 +1,21 @@ + + Microsoft.CodeAnalysis.CSharp + Microsoft.Extensions.DependencyInjection + Microsoft.Extensions.Logging + Newtonsoft.Json + xunit + System.Threading.Tasks + true + true + + +void Main() +{ + +} + +// You can define other methods, fields, classes and namespaces here +private void PrintThreadInfo() +{ + Console.WriteLine($"当前线程ID:{Thread.CurrentThread.ManagedThreadId}"); +} diff --git a/Project/LinqPadUtil/LinqPadUtil.sln b/Project/LinqPadUtil/LinqPadUtil.sln new file mode 100644 index 0000000..6e80f86 --- /dev/null +++ b/Project/LinqPadUtil/LinqPadUtil.sln @@ -0,0 +1,24 @@ +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.13.35919.96 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "LinqPadUtil", "LinqPadUtil\LinqPadUtil.csproj", "{4D9F2A72-8CFE-4E54-9A30-3A68CCD32C95}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {4D9F2A72-8CFE-4E54-9A30-3A68CCD32C95}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {4D9F2A72-8CFE-4E54-9A30-3A68CCD32C95}.Debug|Any CPU.Build.0 = Debug|Any CPU + {4D9F2A72-8CFE-4E54-9A30-3A68CCD32C95}.Release|Any CPU.ActiveCfg = Release|Any CPU + {4D9F2A72-8CFE-4E54-9A30-3A68CCD32C95}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {52B10705-4183-49EB-9E08-3F975170072E} + EndGlobalSection +EndGlobal diff --git a/Project/LinqPadUtil/LinqPadUtil/Helper.cs b/Project/LinqPadUtil/LinqPadUtil/Helper.cs new file mode 100644 index 0000000..7ed7531 --- /dev/null +++ b/Project/LinqPadUtil/LinqPadUtil/Helper.cs @@ -0,0 +1,13 @@ +using System; + +namespace LinqPadUtil +{ + public static class Helper + { + public static void Print(string printMessage) + { + Console.WriteLine(printMessage); + } + + } +} diff --git a/Project/LinqPadUtil/LinqPadUtil/LinqPadUtil.csproj b/Project/LinqPadUtil/LinqPadUtil/LinqPadUtil.csproj new file mode 100644 index 0000000..b4b43f4 --- /dev/null +++ b/Project/LinqPadUtil/LinqPadUtil/LinqPadUtil.csproj @@ -0,0 +1,8 @@ + + + + netstandard2.1 + enable + + + diff --git a/Study1.linq b/Study1.linq new file mode 100644 index 0000000..498f595 --- /dev/null +++ b/Study1.linq @@ -0,0 +1,20 @@ + + Microsoft.CodeAnalysis.CSharp + Microsoft.Extensions.DependencyInjection + Microsoft.Extensions.Logging + Newtonsoft.Json + xunit + System.Threading.Tasks + true + true + + +#load ".\LinqPadScript\MyUtil" +#load ".\CSharpScript\*.cs" + +void Main() +{ + PrintThreadInfo(); + + LinqPadUtil.Helper.Print("我是引用"); +}