sync public allowlist from private myoffice
This commit is contained in:
@@ -1,17 +0,0 @@
|
||||
using AutoMapper;
|
||||
using MyOffice.Core;
|
||||
|
||||
namespace MyOffice.Services;
|
||||
|
||||
public static class AutomapperExtensions
|
||||
{
|
||||
public static List<TTo> ToDto<TTo>(this IEnumerable<IDataModel> list, IMapper mapper)
|
||||
{
|
||||
return mapper.Map<List<TTo>>(list);
|
||||
}
|
||||
|
||||
public static TTo ToDto<TTo>(this IDataModel item, IMapper mapper)
|
||||
{
|
||||
return mapper.Map<TTo>(item);
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
using MyOffice.Services.Identity;
|
||||
|
||||
namespace MyOffice.Services.Mapper;
|
||||
|
||||
public class BaseMappingAction
|
||||
{
|
||||
protected readonly IContextProvider ContextProvider;
|
||||
public BaseMappingAction(IContextProvider contextProvider)
|
||||
{
|
||||
ContextProvider = contextProvider;
|
||||
}
|
||||
}
|
||||
@@ -1,13 +0,0 @@
|
||||
using AutoMapper;
|
||||
|
||||
namespace MyOffice.Services.Mapper;
|
||||
|
||||
public class BaseProfile<TSource, TDestination> : Profile
|
||||
{
|
||||
protected IMappingExpression<TSource, TDestination> Mapping;
|
||||
|
||||
public BaseProfile()
|
||||
{
|
||||
Mapping = CreateMap<TSource, TDestination>();
|
||||
}
|
||||
}
|
||||
@@ -1,21 +0,0 @@
|
||||
namespace MyOffice.Services.Mapper;
|
||||
|
||||
using AutoMapper;
|
||||
using Identity;
|
||||
|
||||
public class UserIdResolver : IValueResolver<object, object, Guid>
|
||||
{
|
||||
private readonly IContextProvider _contextProvider;
|
||||
|
||||
public UserIdResolver(
|
||||
IContextProvider contextProvider
|
||||
)
|
||||
{
|
||||
_contextProvider = contextProvider;
|
||||
}
|
||||
|
||||
public Guid Resolve(object source, object destination, Guid member, ResolutionContext context)
|
||||
{
|
||||
return _contextProvider.UserId;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user