From e08f18c84c96ca794407f4fcb737b26fa76c0a1f Mon Sep 17 00:00:00 2001
From: tangxu <tangxu76880903>
Date: 星期二, 11 六月 2024 09:35:03 +0800
Subject: [PATCH] 改了配置类

---
 WebApi/Areas/HelpPage/SampleGeneration/InvalidSample.cs |   37 +++++++++++++++++++++++++++++++++++++
 1 files changed, 37 insertions(+), 0 deletions(-)

diff --git a/WebApi/Areas/HelpPage/SampleGeneration/InvalidSample.cs b/WebApi/Areas/HelpPage/SampleGeneration/InvalidSample.cs
new file mode 100644
index 0000000..96b7a10
--- /dev/null
+++ b/WebApi/Areas/HelpPage/SampleGeneration/InvalidSample.cs
@@ -0,0 +1,37 @@
+using System;
+
+namespace IStation.WebApi.Areas.HelpPage
+{
+    /// <summary>
+    /// This represents an invalid sample on the help page. There's a display template named InvalidSample associated with this class.
+    /// </summary>
+    public class InvalidSample
+    {
+        public InvalidSample(string errorMessage)
+        {
+            if (errorMessage == null)
+            {
+                throw new ArgumentNullException("errorMessage");
+            }
+            ErrorMessage = errorMessage;
+        }
+
+        public string ErrorMessage { get; private set; }
+
+        public override bool Equals(object obj)
+        {
+            InvalidSample other = obj as InvalidSample;
+            return other != null && ErrorMessage == other.ErrorMessage;
+        }
+
+        public override int GetHashCode()
+        {
+            return ErrorMessage.GetHashCode();
+        }
+
+        public override string ToString()
+        {
+            return ErrorMessage;
+        }
+    }
+}
\ No newline at end of file

--
Gitblit v1.9.3