Добавьте файлы проекта.
This commit is contained in:
10
SQLLinter/Core/Interfaces/IAssemblyWrapper.cs
Normal file
10
SQLLinter/Core/Interfaces/IAssemblyWrapper.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
using System.Reflection;
|
||||
|
||||
namespace SQLLinter.Core.Interfaces;
|
||||
|
||||
public interface IAssemblyWrapper
|
||||
{
|
||||
Assembly LoadFrom(string path);
|
||||
|
||||
Type[] GetExportedTypes(Assembly assembly);
|
||||
}
|
||||
24
SQLLinter/Core/Interfaces/IConfig.cs
Normal file
24
SQLLinter/Core/Interfaces/IConfig.cs
Normal file
@@ -0,0 +1,24 @@
|
||||
using SQLLinter.Common;
|
||||
|
||||
namespace SQLLinter.Core.Interfaces
|
||||
{
|
||||
public interface IConfig
|
||||
{
|
||||
/// <summary>
|
||||
/// Уровень совместимости SQL Server
|
||||
/// </summary>
|
||||
int CompatibilityLevel { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Включенные правила.
|
||||
/// Key - Название правила.
|
||||
/// Value - Уровень предупреждения.
|
||||
/// </summary>
|
||||
Dictionary<string, RuleViolationSeverity> Rules { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Список сторонних плагинов.
|
||||
/// </summary>
|
||||
List<string> Plugins { get; set; }
|
||||
}
|
||||
}
|
||||
8
SQLLinter/Core/Interfaces/IExtendedRuleException.cs
Normal file
8
SQLLinter/Core/Interfaces/IExtendedRuleException.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
using SQLLinter.Common;
|
||||
|
||||
namespace SQLLinter.Core.Interfaces;
|
||||
|
||||
public interface IExtendedRuleException : IRuleException
|
||||
{
|
||||
void SetEndLine(int endLine);
|
||||
}
|
||||
10
SQLLinter/Core/Interfaces/IFileSystemWrapper.cs
Normal file
10
SQLLinter/Core/Interfaces/IFileSystemWrapper.cs
Normal file
@@ -0,0 +1,10 @@
|
||||
namespace SQLLinter.Core.Interfaces;
|
||||
|
||||
public interface IFileSystemWrapper
|
||||
{
|
||||
bool FileExists(string path);
|
||||
|
||||
bool PathIsValidForLint(string path);
|
||||
|
||||
string CombinePath(params string[] paths);
|
||||
}
|
||||
8
SQLLinter/Core/Interfaces/IFileversionWrapper.cs
Normal file
8
SQLLinter/Core/Interfaces/IFileversionWrapper.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
using System.Reflection;
|
||||
|
||||
namespace SQLLinter.Core.Interfaces;
|
||||
|
||||
public interface IFileversionWrapper
|
||||
{
|
||||
string GetVersion(Assembly assembly);
|
||||
}
|
||||
6
SQLLinter/Core/Interfaces/IGlobPatternMatcher.cs
Normal file
6
SQLLinter/Core/Interfaces/IGlobPatternMatcher.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
namespace SQLLinter.Core.Interfaces;
|
||||
|
||||
public interface IGlobPatternMatcher
|
||||
{
|
||||
IEnumerable<string> GetResultsInFullPath(string path);
|
||||
}
|
||||
4
SQLLinter/Core/Interfaces/IOverride.cs
Normal file
4
SQLLinter/Core/Interfaces/IOverride.cs
Normal file
@@ -0,0 +1,4 @@
|
||||
namespace SQLLinter.Core.Interfaces;
|
||||
|
||||
public interface IOverride
|
||||
{ }
|
||||
9
SQLLinter/Core/Interfaces/IPluginHandler.cs
Normal file
9
SQLLinter/Core/Interfaces/IPluginHandler.cs
Normal file
@@ -0,0 +1,9 @@
|
||||
using SQLLinter.Common;
|
||||
|
||||
namespace SQLLinter.Core.Interfaces;
|
||||
|
||||
public interface IPluginHandler
|
||||
{
|
||||
IList<IRule> Rules { get; }
|
||||
IDictionary<string, IRule> RuleWithNames { get; }
|
||||
}
|
||||
19
SQLLinter/Core/Interfaces/IRequest.cs
Normal file
19
SQLLinter/Core/Interfaces/IRequest.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
namespace SQLLinter.Core.Interfaces.Config.Contracts;
|
||||
|
||||
public interface IRequestHandler<in TRequest, out TResponse> where TRequest : IRequest<TResponse>
|
||||
{
|
||||
TResponse Handle(TRequest request);
|
||||
}
|
||||
|
||||
public interface IRequestHandler<in TRequest> where TRequest : IRequest
|
||||
{
|
||||
void Handle(TRequest message);
|
||||
}
|
||||
|
||||
public interface IRequest
|
||||
{
|
||||
}
|
||||
|
||||
public interface IRequest<out TResponse>
|
||||
{
|
||||
}
|
||||
6
SQLLinter/Core/Interfaces/IRuleExceptionFinder.cs
Normal file
6
SQLLinter/Core/Interfaces/IRuleExceptionFinder.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
namespace SQLLinter.Core.Interfaces;
|
||||
|
||||
public interface IRuleExceptionFinder
|
||||
{
|
||||
IEnumerable<IExtendedRuleException> GetIgnoredRuleList(Stream fileStream);
|
||||
}
|
||||
8
SQLLinter/Core/Interfaces/IRuleVisitor.cs
Normal file
8
SQLLinter/Core/Interfaces/IRuleVisitor.cs
Normal file
@@ -0,0 +1,8 @@
|
||||
using SQLLinter.Common;
|
||||
|
||||
namespace SQLLinter.Core.Interfaces;
|
||||
|
||||
public interface IRuleVisitor
|
||||
{
|
||||
void VisitRules(string path, IEnumerable<IRuleException> igoredRules, Stream sqlFileStream);
|
||||
}
|
||||
11
SQLLinter/Core/Interfaces/ISqlFileProcessor.cs
Normal file
11
SQLLinter/Core/Interfaces/ISqlFileProcessor.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
namespace SQLLinter.Core.Interfaces;
|
||||
|
||||
public interface ISqlFileProcessor
|
||||
{
|
||||
int FileCount { get; }
|
||||
|
||||
void ProcessList(List<string> filePaths);
|
||||
void ProcessList(Dictionary<string, Stream> files);
|
||||
void ProcessPath(string path);
|
||||
}
|
||||
Reference in New Issue
Block a user