miniSql

创建
zgc123@gmail.com authored at 11/19/2023 1:40:15 AM
6136600
Tree
0 Parent(s)
Summary: 1 changed files with 59 additions and 0 deletions.
Added +59 -0
Added +59 -0
diff --git a/minisqlquery-master/src/MiniSqlQuery.Core/IFindReplaceProvider.cs b/minisqlquery-master/src/MiniSqlQuery.Core/IFindReplaceProvider.cs
new file mode 100644
index 0000000..bd241c6
--- /dev/null
+++ b/minisqlquery-master/src/MiniSqlQuery.Core/IFindReplaceProvider.cs
@@ -0,0 +1,59 @@
+#region License
+
+// Copyright 2005-2019 Paul Kohler (https://github.com/paulkohler/minisqlquery). All rights reserved.
+// This source code is made available under the terms of the GNU Lesser General Public License v3.0
+// https://github.com/paulkohler/minisqlquery/blob/master/LICENSE
+
+#endregion
+
+using System;
+
+namespace MiniSqlQuery.Core
+{
+    /// <summary>
+    /// 	A control that allows its text to be "found" and optionally "replaced".
+    /// 	The query editor is an obvious provider but other windows can also provide
+    /// 	find/replace functionality by implementing this interface (tools, output windows etc).
+    /// </summary>
+    public interface IFindReplaceProvider : ISupportCursorOffset
+    {
+        /// <summary>
+        /// 	Gets a value indicating whether the text can be replaced, otherwise false.
+        /// </summary>
+        /// <value>The can replace text.</value>
+        bool CanReplaceText { get; }
+
+        /// <summary>
+        /// 	Gets a reference to the text finding service.
+        /// </summary>
+        /// <seealso cref = "SetTextFindService" />
+        /// <value>The text find service.</value>
+        ITextFindService TextFindService { get; }
+
+        /// <summary>
+        /// 	Attemps to find <paramref name = "value" /> in the controls text.
+        /// </summary>
+        /// <param name = "value">The string to search for.</param>
+        /// <param name = "startIndex">The starting position within the buffer.</param>
+        /// <param name = "comparisonType">The string comparison type to use, e.g. <see cref="StringComparison.InvariantCultureIgnoreCase"/></param>
+        /// <returns>The find string.</returns>
+        int FindString(string value, int startIndex, StringComparison comparisonType);
+
+        /// <summary>
+        /// 	Replaces the text from <paramref name = "startIndex" /> for <paramref name = "length" /> characters 
+        /// 	with <paramref name = "value" />.
+        /// </summary>
+        /// <param name = "value">The new string.</param>
+        /// <param name = "startIndex">the starting position.</param>
+        /// <param name = "length">The length (0 implies an insert).</param>
+        /// <returns>True if successful, otherwise false.</returns>
+        /// <seealso cref = "CanReplaceText" />
+        bool ReplaceString(string value, int startIndex, int length);
+
+        /// <summary>
+        /// 	Overrides the default text find service with <paramref name = "textFindService" /> (e.g. a RegEx service).
+        /// </summary>
+        /// <param name = "textFindService">The service to use.</param>
+        void SetTextFindService(ITextFindService textFindService);
+    }
+}
\ No newline at end of file