コード例 #1
0
 public TimelinePostController(ITimelineService timelineService, ITimelinePostService timelinePostService, IGenericMapper mapper, MarkdownProcessor markdownProcessor)
 {
     _timelineService   = timelineService;
     _postService       = timelinePostService;
     _mapper            = mapper;
     _markdownProcessor = markdownProcessor;
 }
コード例 #2
0
ファイル: MapperExtensions.cs プロジェクト: war-man/Timeline
        public static Task <TDestination> MapAsync <TDestination>(this IGenericMapper mapper, object source, IUrlHelper urlHelper, ClaimsPrincipal?user)
        {
            var method = typeof(IGenericMapper).GetMethod(nameof(IGenericMapper.MapAsync));
            var m      = method !.MakeGenericMethod(source.GetType(), typeof(TDestination)) !;

            return((Task <TDestination>)m.Invoke(mapper, new object?[] { source, urlHelper, user }) !);
        }
コード例 #3
0
ファイル: UserController.cs プロジェクト: war-man/Timeline
 /// <summary></summary>
 public UserController(IUserService userService, IUserPermissionService userPermissionService, IUserDeleteService userDeleteService, IGenericMapper mapper)
 {
     _userService           = userService;
     _userPermissionService = userPermissionService;
     _userDeleteService     = userDeleteService;
     _mapper = mapper;
 }
コード例 #4
0
 public UserAppService(
     IUserRepository repository,
     IRefreshTokenRepository refreshTokenRepository)
 {
     _repository             = repository;
     _refreshTokenRepository = refreshTokenRepository;
     _refreshMapper          = new GenericMapper <RefreshToken, RefreshTokenViewModel>();
 }
コード例 #5
0
 // 2.0
 public void ConfigureMapping <T>(IGenericMapper <T> mapping)
 {
     if (Mapping == null)
     {
         Mapping = new Dictionary <Mapper, Type>();
     }
     Mapping.Add((Mapper)mapping, typeof(T));
 }
コード例 #6
0
 public MessageController
 (
     IModelProvider <MessageModel> messageProvider,
     IGenericMapper <MessageModel, MessageQueryResultModel> messageModelResultMapper
 )
 {
     _messageProvider          = messageProvider;
     _messageModelResultMapper = messageModelResultMapper;
 }
 public MessageModelSqlServerProvider
 (
     string connectionString,
     IGenericMapper <MessageQueryParametersModel, DynamicParameters> messageQueryParametersMapper
 )
 {
     _connectionString             = connectionString;
     _messageQueryParametersMapper = messageQueryParametersMapper;
 }
コード例 #8
0
ファイル: MapperExtensions.cs プロジェクト: war-man/Timeline
        public static async Task <List <TDestination> > MapListAsync <TDestination>(this IGenericMapper mapper, IEnumerable <object> source, IUrlHelper urlHelper, ClaimsPrincipal?user)
        {
            var result = new List <TDestination>();

            foreach (var s in source)
            {
                result.Add(await mapper.MapAsync <TDestination>(s, urlHelper, user));
            }
            return(result);
        }
コード例 #9
0
ファイル: QueryResult.cs プロジェクト: kouweizhong/Guidelines
 public override ActionResult Failure(IGenericMapper mapper, ErrorContext errorContext)
 {
     return(_failure(_message, mapper, errorContext));
 }
コード例 #10
0
ファイル: QueryResult.cs プロジェクト: kouweizhong/Guidelines
 public override ActionResult Success(IGenericMapper mapper)
 {
     return(_success(Result, mapper));
 }
コード例 #11
0
 public TimelineController(IUserService userService, ITimelineService service, IGenericMapper mapper)
 {
     _userService = userService;
     _service     = service;
     _mapper      = mapper;
 }
コード例 #12
0
ファイル: Mapper.cs プロジェクト: neilcarberry/ExampleService
 public Mapper(IGenericMapper <TIn, TOut> objectmapper)
 {
     Objectmapper = objectmapper;
 }
コード例 #13
0
 public ResultInvoker(IResultProcessor <TActionMethodResult, TExecutedCommandResult> resultProcessor, IGenericMapper mapper, IErrorAspect errorAspect)
 {
     _resultProcessor = resultProcessor;
     _errorAspect     = errorAspect;
     _mapper          = mapper;
 }
コード例 #14
0
ファイル: SearchController.cs プロジェクト: war-man/Timeline
 public SearchController(ISearchService service, IGenericMapper mapper)
 {
     _service = service;
     _mapper  = mapper;
 }
コード例 #15
0
 public HighlightTimelineController(IHighlightTimelineService service, ITimelineService timelineService, IGenericMapper mapper)
 {
     _service         = service;
     _timelineService = timelineService;
     _mapper          = mapper;
 }
コード例 #16
0
ファイル: TokenController.cs プロジェクト: war-man/Timeline
 public TokenController(IUserTokenManager userTokenManager, IGenericMapper mapper, IClock clock)
 {
     _userTokenManager = userTokenManager;
     _mapper           = mapper;
     _clock            = clock;
 }
コード例 #17
0
 public BookmarkTimelineController(IBookmarkTimelineService service, ITimelineService timelineService, IGenericMapper mapper)
 {
     _service         = service;
     _timelineService = timelineService;
     _mapper          = mapper;
 }
コード例 #18
0
 public ApplicationServiceBase()
 {
     _mapper      = new GenericMapper <TEntity, TViewModel>();
     _serviceUser = "******";
 }
コード例 #19
0
 public CommandResult ProcessCommand(CommandResult <TInput> actionMethodResult, IGenericMapper mapper)
 {
     return(_commandProcessor.Process(actionMethodResult.GetMessage(mapper)));
 }
コード例 #20
0
 public GenericService(IGenericRepository <E> repository, IGenericMapper <E, D> mapper)
 {
     this.repository = repository;
     this.mapper     = mapper;
 }
コード例 #21
0
ファイル: QueryResult.cs プロジェクト: kouweizhong/Guidelines
 public TInput GetMessage(IGenericMapper mapper)
 {
     _message = MessageGetter(mapper);
     return(_message);
 }