From e75c04f85ba95d66b496d0cbae52cf6ea4184062 Mon Sep 17 00:00:00 2001
From: bicijinlian <bicijinlian@163.com>
Date: Thu, 27 Mar 2025 10:42:55 +0800
Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E9=A1=B9=E7=9B=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 CSharpScript/Helper.cs                        | 13 ++++++++++
 LinqPadScript/MyUtil.linq                     | 21 ++++++++++++++++
 Project/LinqPadUtil/LinqPadUtil.sln           | 24 +++++++++++++++++++
 Project/LinqPadUtil/LinqPadUtil/Helper.cs     | 13 ++++++++++
 .../LinqPadUtil/LinqPadUtil.csproj            |  8 +++++++
 Study1.linq                                   | 20 ++++++++++++++++
 6 files changed, 99 insertions(+)
 create mode 100644 CSharpScript/Helper.cs
 create mode 100644 LinqPadScript/MyUtil.linq
 create mode 100644 Project/LinqPadUtil/LinqPadUtil.sln
 create mode 100644 Project/LinqPadUtil/LinqPadUtil/Helper.cs
 create mode 100644 Project/LinqPadUtil/LinqPadUtil/LinqPadUtil.csproj
 create mode 100644 Study1.linq

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 @@
+<Query Kind="Program">
+  <NuGetReference>Microsoft.CodeAnalysis.CSharp</NuGetReference>
+  <NuGetReference>Microsoft.Extensions.DependencyInjection</NuGetReference>
+  <NuGetReference>Microsoft.Extensions.Logging</NuGetReference>
+  <NuGetReference>Newtonsoft.Json</NuGetReference>
+  <NuGetReference>xunit</NuGetReference>
+  <Namespace>System.Threading.Tasks</Namespace>
+  <IncludeLinqToSql>true</IncludeLinqToSql>
+  <IncludeAspNet>true</IncludeAspNet>
+</Query>
+
+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 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+  <PropertyGroup>
+    <TargetFramework>netstandard2.1</TargetFramework>
+    <Nullable>enable</Nullable>
+  </PropertyGroup>
+
+</Project>
diff --git a/Study1.linq b/Study1.linq
new file mode 100644
index 0000000..498f595
--- /dev/null
+++ b/Study1.linq
@@ -0,0 +1,20 @@
+<Query Kind="Program">
+  <NuGetReference>Microsoft.CodeAnalysis.CSharp</NuGetReference>
+  <NuGetReference>Microsoft.Extensions.DependencyInjection</NuGetReference>
+  <NuGetReference>Microsoft.Extensions.Logging</NuGetReference>
+  <NuGetReference>Newtonsoft.Json</NuGetReference>
+  <NuGetReference>xunit</NuGetReference>
+  <Namespace>System.Threading.Tasks</Namespace>
+  <IncludeLinqToSql>true</IncludeLinqToSql>
+  <IncludeAspNet>true</IncludeAspNet>
+</Query>
+
+#load ".\LinqPadScript\MyUtil"
+#load ".\CSharpScript\*.cs"
+
+void Main()
+{
+	PrintThreadInfo();
+	
+	LinqPadUtil.Helper.Print("我是引用");
+}