From cba7637255572404da61accb9fe53cd20533aed4 Mon Sep 17 00:00:00 2001 From: Hadi Khazaee Asl Date: Mon, 9 Nov 2026 15:40:10 +0330 Subject: [PATCH] Adding RateLimit Feature ... --- Attributes/XRateLimitAttribute.cs | 117 +++++++++++++++ Configurations/XRateLimitConfiguration.cs | 26 ++++ Constants/ConfigurationNodeNames.cs | 1 + Constants/XRateLimitConstants.cs | 16 +++ Constants/XRateLimitKeyMode.cs | 25 ++++ DI/XDIHelperExtension.cs | 1 - Extensions/DIExtensions.cs | 90 +++++++++++- Extensions/IConfigurationExtensions.cs | 16 +++ Extensions/XCommonsExtensions.cs | 67 +++++++++ Extensions/XHttpContextExtensions.cs | 93 +++++++++++- Extensions/XMiddlewareExtensions.cs | 19 ++- Interfaces/IXRateLimitProvider.cs | 21 +++ Middlewares/XRateLimitMiddleware.cs | 115 +++++++++++++++ Models/XRateLimitCounter.cs | 11 ++ Models/XRateLimitResult.cs | 14 ++ Providers/XRateLimitProvider.cs | 164 ++++++++++++++++++++++ xCommons.csproj | 1 + 17 files changed, 787 insertions(+), 10 deletions(-) create mode 100644 Attributes/XRateLimitAttribute.cs create mode 100644 Configurations/XRateLimitConfiguration.cs create mode 100644 Constants/XRateLimitConstants.cs create mode 100644 Constants/XRateLimitKeyMode.cs create mode 100644 Extensions/XCommonsExtensions.cs create mode 100644 Interfaces/IXRateLimitProvider.cs create mode 100644 Middlewares/XRateLimitMiddleware.cs create mode 100644 Models/XRateLimitCounter.cs create mode 100644 Models/XRateLimitResult.cs create mode 100644 Providers/XRateLimitProvider.cs diff --git a/Attributes/XRateLimitAttribute.cs b/Attributes/XRateLimitAttribute.cs new file mode 100644 index 0000000..da0012b --- /dev/null +++ b/Attributes/XRateLimitAttribute.cs @@ -0,0 +1,117 @@ +using System; +using xCommons.Models; +using xCommons.Constants; +using xCommons.Extensions; +using xCommons.Interfaces; +using xCommons.Configurations; +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc.Filters; +using Microsoft.Extensions.DependencyInjection; + +namespace xCommons.Attributes +{ + [AttributeUsage( + AttributeTargets.Class | AttributeTargets.Method, + AllowMultiple = false, + Inherited = true + )] + public partial class XRateLimitAttribute : Attribute, IActionFilter, IOrderedFilter + { + public int Limit { get; set; } = 0; + public int Order { get; set; } = -1000; + public int PeriodSeconds { get; set; } = 0; + public string KeyPrefix { get; set; } = null; + public XRateLimitKeyMode KeyMode { get; set; } = XRateLimitKeyMode.Ip; + + public void OnActionExecuting(ActionExecutingContext context) + { + // + var provider = context.HttpContext.RequestServices + .GetService(); + + var configuration = context.HttpContext.RequestServices + .GetService(); + + // + if (provider.IsNull() || + configuration.IsNull() || + !provider.IsEnabled) + { + return; + } + + // + var limit = Limit > 0 + ? Limit + : configuration.DefaultLimit; + + // + var periodSeconds = PeriodSeconds > 0 + ? PeriodSeconds + : configuration.DefaultPeriodSeconds; + + // + var key = context.HttpContext.GetXRateLimitKey(KeyMode); + if (!KeyPrefix.IsNullOrEmpty()) + { + key = string.Format("{0}:{1}", KeyPrefix, key); + } + + // + var result = provider.TryConsume( + key: key, + limit: limit, + periodSeconds: periodSeconds + ); + + // + context.HttpContext.Items[XRateLimitConstants.AppliedItemKey] = true; + WriteHeaders(context.HttpContext, result); + + // + if (!result.IsAllowed) + { + // + context.Result = new ObjectResult(new + { + resetOn = result.ResetOn, + retryAfter = result.RetryAfterSeconds, + message = "Too many requests. Please try again later.", + }) + { + StatusCode = configuration.StatusCode + }; + } + } + + public void OnActionExecuted(ActionExecutedContext context) + { } + + private static void WriteHeaders( + HttpContext context, + XRateLimitResult result + ) + { + // + context.Response.Headers[XRateLimitConstants.LimitHeader] = + result.Limit.ToString(); + + // + context.Response.Headers[XRateLimitConstants.RemainingHeader] = + result.Remaining.ToString(); + + // + context.Response.Headers[XRateLimitConstants.ResetHeader] = + result.ResetOn.ToUnixTimeSeconds().ToString(); + + // + if (!result.IsAllowed) + { + // + context.Response.Headers[XRateLimitConstants.RetryAfterHeader] = + result.RetryAfterSeconds.ToString(); + } + } + } +} \ No newline at end of file diff --git a/Configurations/XRateLimitConfiguration.cs b/Configurations/XRateLimitConfiguration.cs new file mode 100644 index 0000000..d92a483 --- /dev/null +++ b/Configurations/XRateLimitConfiguration.cs @@ -0,0 +1,26 @@ +using xCommons.Constants; +using System.Collections.Generic; + +namespace xCommons.Configurations +{ + public class XRateLimitConfiguration + { + public bool Enabled { get; set; } = false; + public int StatusCode { get; set; } = 429; + public int DefaultLimit { get; set; } = 60; + public int DefaultPeriodSeconds { get; set; } = 60; + public bool ApplyToAllRoutes { get; set; } = false; + public ICollection Rules { get; set; } = []; + public XRateLimitKeyMode DefaultKeyMode { get; set; } = XRateLimitKeyMode.Ip; + } + + public partial class XRateLimitRule + { + public int Limit { get; set; } = 60; + public bool Enabled { get; set; } = true; + public int PeriodSeconds { get; set; } = 60; + public string PathPrefix { get; set; } = "/"; + public string Name { get; set; } = string.Empty; + public XRateLimitKeyMode KeyMode { get; set; } = XRateLimitKeyMode.Ip; + } +} \ No newline at end of file diff --git a/Constants/ConfigurationNodeNames.cs b/Constants/ConfigurationNodeNames.cs index de7eaa6..c38b671 100644 --- a/Constants/ConfigurationNodeNames.cs +++ b/Constants/ConfigurationNodeNames.cs @@ -2,6 +2,7 @@ namespace xCommons.Constants { public partial struct ConfigurationNodeNames { public const string CERTIFICATES_NODE = "Certificates"; public const string SWAGGER_NODE = "SwaggerConfiguration"; + public const string RATE_LIMIT_NODE = "RateLimitConfiguration"; public const string FILE_TYPE_DETECTOR_NODE = "FileTypeDetectorConfiguration"; public const string MESSAGE_RESOURCE_TITLES_NODE = "MessageResourceTitles"; } diff --git a/Constants/XRateLimitConstants.cs b/Constants/XRateLimitConstants.cs new file mode 100644 index 0000000..e90e30d --- /dev/null +++ b/Constants/XRateLimitConstants.cs @@ -0,0 +1,16 @@ +namespace xCommons.Constants +{ + /// + /// RateLimit Implementation Constants ... + /// + public partial struct XRateLimitConstants + { + public const string CacheKeyPrefix = "xratelimit"; + public const string ClientIdHeader = "X-ClientId"; + public const string RetryAfterHeader = "Retry-After"; + public const string LimitHeader = "X-RateLimit-Limit"; + public const string ResetHeader = "X-RateLimit-Reset"; + public const string AppliedItemKey = "X-RateLimit-Applied"; + public const string RemainingHeader = "X-RateLimit-Remaining"; + } +} \ No newline at end of file diff --git a/Constants/XRateLimitKeyMode.cs b/Constants/XRateLimitKeyMode.cs new file mode 100644 index 0000000..11cb50d --- /dev/null +++ b/Constants/XRateLimitKeyMode.cs @@ -0,0 +1,25 @@ +using xExceptions.Attributes; + +namespace xCommons.Constants +{ + /// + /// RateLimiting Modes ... + /// + public enum XRateLimitKeyMode + { + [StringValue("Ip")] + Ip = 0, + + [StringValue("ClientId")] + ClientId = 1, + + [StringValue("User")] + User = 2, + + [StringValue("Route")] + Route = 3, + + [StringValue("Custom")] + Custom = 4 + } +} \ No newline at end of file diff --git a/DI/XDIHelperExtension.cs b/DI/XDIHelperExtension.cs index d75d78b..d36fff1 100644 --- a/DI/XDIHelperExtension.cs +++ b/DI/XDIHelperExtension.cs @@ -28,5 +28,4 @@ public static partial class XDIHelperExtension services.AddXCommons(); services.AddXFileTypeDetector(configuration); } - } \ No newline at end of file diff --git a/Extensions/DIExtensions.cs b/Extensions/DIExtensions.cs index 0192ae5..0842d45 100644 --- a/Extensions/DIExtensions.cs +++ b/Extensions/DIExtensions.cs @@ -14,6 +14,7 @@ using Swashbuckle.AspNetCore.SwaggerUI; using Swashbuckle.AspNetCore.SwaggerGen; using Microsoft.Extensions.Configuration; using Microsoft.Extensions.DependencyInjection; +using xExceptions.Constants; namespace xCommons.Extensions { @@ -39,7 +40,7 @@ namespace xCommons.Extensions /// /// public static void AddXAppConfiguration( - this IServiceCollection services, + this IServiceCollection services, IConfiguration configuration, string environment = null ) @@ -52,6 +53,41 @@ namespace xCommons.Extensions services.AddSingleton(appConfiguration); } + /// + /// Retrieve Rate Limit Configurations and Register it ... + /// + /// + /// + public static void AddXRateLimitConfiguration( + this IServiceCollection source, + IConfiguration configuration + ) + { + // + var config = configuration.GetXRateLimitConfiguration(); + source.AddXRateLimitConfiguration(config); + } + + /// + /// Register Rate Limit Configuration ... + /// + /// + /// + public static void AddXRateLimitConfiguration( + this IServiceCollection source, + XRateLimitConfiguration configuration + ) + { + // + if (source.IsNull()) + { + XException.InvalidConfiguration.Throw(); + } + + // + source.AddSingleton(configuration); + } + /// /// Add Environment name to XAppConfiguration ... /// @@ -74,7 +110,7 @@ namespace xCommons.Extensions { appConfiguration.Environment = environmentName; } - } + } } /// @@ -509,6 +545,56 @@ namespace xCommons.Extensions }); } + /// + /// Register RateLimit Service ... + /// + /// + public static void AddXRateLimit( + this IServiceCollection source + ) + { + // + source.AddMemoryCache(); + source.AddSingleton(); + } + + /// + /// Register RateLimit Service ... + /// Configs Retrieved from AppSettings ... + /// + /// + /// + public static void AddXRateLimit( + this IServiceCollection source, + IConfiguration configuration + ) + { + // + var config = configuration.GetXRateLimitConfiguration(); + source.AddXRateLimit(config); + } + + /// + /// Register RateLimit Service ... + /// + /// + /// + public static void AddXRateLimit( + this IServiceCollection source, + XRateLimitConfiguration configuration + ) + { + // + if (configuration.IsNull()) + { + XException.InvalidConfiguration.Throw(); + } + + // + source.AddXRateLimitConfiguration(configuration); + source.AddXRateLimit(); + } + public static void AddXFileTypeDetector( this IServiceCollection source, IConfiguration configuration diff --git a/Extensions/IConfigurationExtensions.cs b/Extensions/IConfigurationExtensions.cs index 8631fc1..b4f3218 100644 --- a/Extensions/IConfigurationExtensions.cs +++ b/Extensions/IConfigurationExtensions.cs @@ -51,6 +51,22 @@ namespace xCommons.Extensions return xSwaggerConfigSection.Get(); } + /// + /// Retrieve RateLimit Configurations ... + /// + /// + /// + public static XRateLimitConfiguration GetXRateLimitConfiguration(this IConfiguration source) + { + // + var section = source + .GetSection(ConfigurationNodeNames.RATE_LIMIT_NODE); + + // + var result = section.Get(); + return result; + } + /// /// Retrieve File Type Detector Configuration ... /// diff --git a/Extensions/XCommonsExtensions.cs b/Extensions/XCommonsExtensions.cs new file mode 100644 index 0000000..1e0c531 --- /dev/null +++ b/Extensions/XCommonsExtensions.cs @@ -0,0 +1,67 @@ +using System.Linq; +using xCommons.Configurations; + +namespace xCommons.Extensions +{ + public static class XCommonsExtensions + { + /// + /// Extract RateLimit Rule based on given Path ... + /// + /// + /// + /// + public static XRateLimitRule GetMatchingRule( + this XRateLimitConfiguration source, + string path + ) + { + // + if (!source.Enabled) + { + return null; + } + + // + var normalizedPath = path.IsNullOrEmpty() + ? "/" + : path.ToNormalString(); + + // + var rule = source.Rules.IsNull() + ? null + : source.Rules + .Where(r => + !r.IsNull() && + r.Enabled && + !r.PathPrefix.IsNullOrEmpty() && + normalizedPath.StartsWith(r.PathPrefix.ToNormalString())) + .OrderByDescending(r => r.PathPrefix.Length) + .FirstOrDefault(); + + // + if (!rule.IsNull()) + { + return rule; + } + + // + if (source.ApplyToAllRoutes) + { + // + return new XRateLimitRule + { + Enabled = true, + Name = "Default", + PathPrefix = "/", + Limit = source.DefaultLimit, + KeyMode = source.DefaultKeyMode, + PeriodSeconds = source.DefaultPeriodSeconds, + }; + } + + // + return null; + } + } +} \ No newline at end of file diff --git a/Extensions/XHttpContextExtensions.cs b/Extensions/XHttpContextExtensions.cs index 5c0cb98..8d5a3fd 100644 --- a/Extensions/XHttpContextExtensions.cs +++ b/Extensions/XHttpContextExtensions.cs @@ -1,22 +1,105 @@ using System.IO; +using xCommons.Constants; using Microsoft.AspNetCore.Http; -namespace xCommons.Extensions { - public static partial class XHttpContextExtensions { +namespace xCommons.Extensions +{ + public static partial class XHttpContextExtensions + { /// /// Convert IFormFile to Bytes Array /// /// /// - public static byte[] ToByteArray (this IFormFile source) { + public static byte[] ToByteArray(this IFormFile source) + { // byte[] data; - using (var br = new BinaryReader (source.OpenReadStream ())) { - data = br.ReadBytes ((int) source.OpenReadStream ().Length); + using (var br = new BinaryReader(source.OpenReadStream())) + { + data = br.ReadBytes((int)source.OpenReadStream().Length); } // return data; } + + /// + /// Extract Rate Limit Key ... + /// + /// + /// + /// + public static string GetXRateLimitKey( + this HttpContext source, + XRateLimitKeyMode keyMode + ) + { + // + if (source.IsNull()) + { + return "unknown"; + } + + // + switch (keyMode) + { + // + case XRateLimitKeyMode.ClientId: + { + // + var clientId = source.Request.Headers[XRateLimitConstants.ClientIdHeader].ToString(); + return clientId.IsNullOrEmpty() + ? "anonymous" + : clientId.ToNormalString(); + } + + // + case XRateLimitKeyMode.User: + { + // + var userId = source.User?.FindFirst(XCustomClaims.UserId)?.Value; + if (userId.IsNullOrEmpty()) + { + userId = source.User?.Identity?.Name; + } + + // + return userId.IsNullOrEmpty() + ? "anonymous" + : userId.ToNormalString(); + } + + // + case XRateLimitKeyMode.Route: + { + // + return string.Format( + "{0}:{1}", + source.Request.Method, + source.Request.Path + ).ToNormalString(); + } + + // + case XRateLimitKeyMode.Custom: + { + return "custom"; + } + + // + case XRateLimitKeyMode.Ip: + default: + { + // + return source.Connection.RemoteIpAddress + .IsNull() + ? "unknown" + : source.Connection.RemoteIpAddress + .ToString() + .ToNormalString(); + } + } + } } } \ No newline at end of file diff --git a/Extensions/XMiddlewareExtensions.cs b/Extensions/XMiddlewareExtensions.cs index 9b35ce5..39c67d2 100644 --- a/Extensions/XMiddlewareExtensions.cs +++ b/Extensions/XMiddlewareExtensions.cs @@ -1,5 +1,20 @@ +using xCommons.Middlewares; +using Microsoft.AspNetCore.Builder; + namespace xCommons.Extensions { - public static class XMiddlewareExtensions - { } + public static partial class XMiddlewareExtensions + { + /// + /// Use XRateLimit Middleware ... + /// + /// + /// + public static IApplicationBuilder UseXRateLimit( + this IApplicationBuilder source + ) + { + return source.UseMiddleware(); + } + } } diff --git a/Interfaces/IXRateLimitProvider.cs b/Interfaces/IXRateLimitProvider.cs new file mode 100644 index 0000000..39ffc54 --- /dev/null +++ b/Interfaces/IXRateLimitProvider.cs @@ -0,0 +1,21 @@ +using xCommons.Models; +using xCommons.Configurations; + +namespace xCommons.Interfaces +{ + public interface IXRateLimitProvider + { + bool IsEnabled { get; } + + XRateLimitResult TryConsume( + string key, + int limit, + int periodSeconds + ); + + XRateLimitResult TryConsume( + string key, + XRateLimitRule rule + ); + } +} \ No newline at end of file diff --git a/Middlewares/XRateLimitMiddleware.cs b/Middlewares/XRateLimitMiddleware.cs new file mode 100644 index 0000000..29a7f85 --- /dev/null +++ b/Middlewares/XRateLimitMiddleware.cs @@ -0,0 +1,115 @@ +using System.Net; +using xCommons.Models; +using xCommons.Constants; +using xCommons.Attributes; +using xCommons.Extensions; +using xCommons.Interfaces; +using System.Threading.Tasks; +using xCommons.Configurations; +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Http.Features; + +namespace xCommons.Middlewares +{ + public class XRateLimitMiddleware + { + // + private readonly RequestDelegate next; + private readonly IXRateLimitProvider provider; + private readonly XRateLimitConfiguration configuration; + + public XRateLimitMiddleware( + RequestDelegate next, + IXRateLimitProvider provider, + XRateLimitConfiguration configuration + ) + { + // + this.next = next; + this.provider = provider; + this.configuration = configuration; + } + + public async Task InvokeAsync(HttpContext context) + { + // + if (!provider.IsEnabled) + { + await next(context); + return; + } + + // + var endpoint = context.Features.Get()?.Endpoint; + if (!endpoint.IsNull() && + !endpoint.Metadata + .GetMetadata() + .IsNull() + ) + { + // + await next(context); + return; + } + + // + var rule = configuration.GetMatchingRule(context.Request.Path); + if (rule.IsNull()) + { + await next(context); + return; + } + + // + var key = context.GetXRateLimitKey(rule.KeyMode); + var result = provider.TryConsume(key, rule); + + // + WriteHeaders(context, result); + + // + if (!result.IsAllowed) + { + // + await context.WriteResponseAsJsonAsync( + status: (HttpStatusCode)configuration.StatusCode, + data: new + { + message = "Too many requests. Please try again later.", + retryAfter = result.RetryAfterSeconds, + resetOn = result.ResetOn + } + ); + return; + } + + // + await next(context); + } + + private static void WriteHeaders( + HttpContext context, + XRateLimitResult result + ) + { + // + context.Response.Headers[XRateLimitConstants.LimitHeader] = + result.Limit.ToString(); + + // + context.Response.Headers[XRateLimitConstants.RemainingHeader] = + result.Remaining.ToString(); + + // + context.Response.Headers[XRateLimitConstants.ResetHeader] = + result.ResetOn.ToUnixTimeSeconds().ToString(); + + // + if (!result.IsAllowed) + { + context.Response.Headers[XRateLimitConstants.RetryAfterHeader] = + result.RetryAfterSeconds.ToString(); + } + } + } +} \ No newline at end of file diff --git a/Models/XRateLimitCounter.cs b/Models/XRateLimitCounter.cs new file mode 100644 index 0000000..266ce34 --- /dev/null +++ b/Models/XRateLimitCounter.cs @@ -0,0 +1,11 @@ +using System; + +namespace xCommons.Models +{ + public class XRateLimitCounter + { + public int Count { get; set; } + public int Limit { get; set; } + public DateTimeOffset ResetOn { get; set; } + } +} \ No newline at end of file diff --git a/Models/XRateLimitResult.cs b/Models/XRateLimitResult.cs new file mode 100644 index 0000000..7aba283 --- /dev/null +++ b/Models/XRateLimitResult.cs @@ -0,0 +1,14 @@ +using System; + +namespace xCommons.Models +{ + public class XRateLimitResult + { + public int Limit { get; set; } + public string Key { get; set; } + public int Remaining { get; set; } + public bool IsAllowed { get; set; } + public int RetryAfterSeconds { get; set; } + public DateTimeOffset ResetOn { get; set; } + } +} \ No newline at end of file diff --git a/Providers/XRateLimitProvider.cs b/Providers/XRateLimitProvider.cs new file mode 100644 index 0000000..c200d21 --- /dev/null +++ b/Providers/XRateLimitProvider.cs @@ -0,0 +1,164 @@ +using System; +using xCommons.Models; +using xCommons.Constants; +using xCommons.Extensions; +using xCommons.Interfaces; +using xExceptions.Constants; +using xCommons.Configurations; +using System.Collections.Concurrent; +using Microsoft.Extensions.Caching.Memory; + +namespace xCommons.Providers +{ + public class XRateLimitProvider : IXRateLimitProvider + { + // + private readonly IMemoryCache cache; + private readonly XRateLimitConfiguration configuration; + private readonly ConcurrentDictionary syncRoots = new(); + + public XRateLimitProvider( + IMemoryCache cache, + XRateLimitConfiguration configuration + ) + { + // + this.cache = cache; + this.configuration = configuration; + } + + public bool IsEnabled + { + get + { + return !configuration.IsNull() && configuration.Enabled; + } + } + + public XRateLimitResult TryConsume( + string key, + XRateLimitRule rule + ) + { + // + if (rule.IsNull()) + { + XException.InvalidArgs.Throw(); + } + + // + return TryConsume( + key: key, + limit: rule.Limit, + periodSeconds: rule.PeriodSeconds + ); + } + + public XRateLimitResult TryConsume( + string key, + int limit, + int periodSeconds + ) + { + // + if (limit <= 0 || periodSeconds <= 0) + { + XException.InvalidArgs.Throw(); + } + + // + var normalizedKey = BuildCacheKey(key); + var now = DateTimeOffset.UtcNow; + + // + if (!IsEnabled) + { + // + return new XRateLimitResult + { + Limit = limit, + IsAllowed = true, + Remaining = limit, + Key = normalizedKey, + RetryAfterSeconds = 0, + ResetOn = now.AddSeconds(periodSeconds) + }; + } + + // + var syncRoot = syncRoots.GetOrAdd( + key: normalizedKey, + valueFactory: _ => new object() + ); + + // + lock (syncRoot) + { + // + var counter = cache.Get(normalizedKey); + if (counter.IsNull() || counter.ResetOn <= now) + { + // + counter = new XRateLimitCounter + { + Count = 0, + Limit = limit, + ResetOn = now.AddSeconds(periodSeconds) + }; + } + + // + counter.Count++; + counter.Limit = limit; + + // + var remaining = Math.Max(0, limit - counter.Count); + var isAllowed = counter.Count <= limit; + var retryAfter = isAllowed + ? 0 + : (int)Math.Ceiling((counter.ResetOn - now).TotalSeconds); + + // + var options = new MemoryCacheEntryOptions + { + AbsoluteExpiration = counter.ResetOn + }; + + // + options.RegisterPostEvictionCallback((cacheKey, value, reason, state) => + { + syncRoots.TryRemove(cacheKey.ToString(), out _); + }); + + // + cache.Set(normalizedKey, counter, options); + + // + return new XRateLimitResult + { + Limit = limit, + Key = normalizedKey, + IsAllowed = isAllowed, + Remaining = remaining, + ResetOn = counter.ResetOn, + RetryAfterSeconds = retryAfter, + }; + } + } + + private static string BuildCacheKey(string key) + { + // + var normalized = key.IsNullOrEmpty() + ? "anonymous" + : key.ToNormalString(); + + // + return string.Format( + "{0}:{1}", + XRateLimitConstants.CacheKeyPrefix, + normalized + ); + } + } +} \ No newline at end of file diff --git a/xCommons.csproj b/xCommons.csproj index df16077..7edba29 100644 --- a/xCommons.csproj +++ b/xCommons.csproj @@ -47,6 +47,7 @@ +