Правки в соответствие со spellchecker

This commit is contained in:
Оля Бизюкова 2024-12-10 19:23:43 +05:00
parent a6e611ec0d
commit 76192003ba
10 changed files with 14 additions and 20 deletions

View File

@ -100,7 +100,7 @@ public static class DependencyInjection
{
OnMessageReceived = context =>
{
var accessToken = context.Request.Headers["Authorization"]
var accessToken = context.Request.Headers.Authorization
.ToString()
.Replace(JwtBearerDefaults.AuthenticationScheme, string.Empty)
.Trim();

View File

@ -8,16 +8,14 @@ public static class Extensions
public static T GetUserId<T>(this ClaimsPrincipal principal)
{
ArgumentNullException.ThrowIfNull(principal, nameof(principal));
var loggedInUserId = principal.FindFirstValue(ClaimTypes.NameIdentifier);
if (String.IsNullOrEmpty(loggedInUserId))
throw new ArgumentNullException(nameof(loggedInUserId));
ArgumentNullException.ThrowIfNullOrEmpty(loggedInUserId, nameof(loggedInUserId));
var result = TypeDescriptor.GetConverter(typeof(T)).ConvertFromInvariantString(loggedInUserId);
if (result is null)
throw new ArgumentNullException(nameof(result));
ArgumentNullException.ThrowIfNull(result, nameof(result));
return (T)result;

View File

@ -1,5 +1,4 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable

View File

@ -1,5 +1,4 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable

View File

@ -1,6 +1,4 @@
using System;
using System.Collections.Generic;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable

View File

@ -1,5 +1,4 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable

View File

@ -44,7 +44,7 @@ public static class EFExtensionsSortBy
var name = propertyInfo.Name.ToLower();
ParameterExpression arg = Expression.Parameter(type, "x");
MemberExpression property = Expression.Property(arg, propertyInfo.Name);
var selector = Expression.Lambda(property, [ arg ]);
var selector = Expression.Lambda(property, [arg]);
var typeAccessor = new TypeAccessor
{
KeySelector = selector,
@ -200,7 +200,7 @@ public static class EFExtensionsSortBy
: orderByAscending;
var newQuery = (IOrderedQueryable<TSource>)genericMethod
.Invoke(genericMethod, new object[] { query, lambdaExpression })!;
.Invoke(genericMethod, [query, lambdaExpression])!;
return newQuery;
}

View File

@ -195,7 +195,7 @@ public class ChangeLogRepository : IChangeLogRepository
return datesOnly;
}
private ChangeLog CreateEntityFromDto(Guid idAuthor, Guid idDiscriminator, DataWithWellDepthAndSectionDto dto)
private static ChangeLog CreateEntityFromDto(Guid idAuthor, Guid idDiscriminator, DataWithWellDepthAndSectionDto dto)
{
var entity = new ChangeLog()
{

View File

@ -34,7 +34,7 @@ public class TimeSeriesDataCachedRepository<TEntity, TDto> : TimeSeriesDataRepos
public override async Task<IEnumerable<TDto>> GetGtDate(DateTimeOffset dateBegin, CancellationToken token)
{
if (LastData.Count() == 0 || LastData[0].Date > dateBegin)
if (LastData.Count == 0 || LastData[0].Date > dateBegin)
{
var dtos = await base.GetGtDate(dateBegin, token);
return dtos;

View File

@ -70,8 +70,9 @@ minidisplay
oauth
sbin
прога
Persistance
yyyyMMdd_HHmmssfff
Serializers
keycloak
Params
Mapster
dest