public ElevatedSessionMessageHandlerStrategyDecorator(ILog logger, IElevationVerificationService verifyService, IMessageHandlerStrategy <TSessionType, TNetworkMessageType> handlerStrategyToDecorate) { //TODO: Check null-ness Logger = logger; verificationService = verifyService; decoratedStrategy = handlerStrategyToDecorate; }
protected override ResponseMessageHandlerService <InstanceClientPeer> CreateConcreteService(IMessageHandlerStrategy <InstanceClientPeer, IResponseMessage> strat) { return(new ResponseMessageHandlerService <InstanceClientPeer>(strat)); }
/// <summary> /// As specified by the base class documentation it generates a valid non-null <see cref="ResponseMessageHandlerService{TSessionType}"/> instance. /// </summary> /// <param name="strat">Strategy the base class decided to use.</param> /// <returns>Non-null instance of <see cref="ResponseMessageHandlerService{TSessionType}"/> or throws instead.</returns> protected override ResponseMessageHandlerService <GameServerListWebClient> CreateConcreteService(IMessageHandlerStrategy <GameServerListWebClient, IResponseMessage> strat) { //just create and return the handler as expected with the provided strat return(new ResponseMessageHandlerService <GameServerListWebClient>(strat)); }
/// <summary> /// Produces a concrete non-null instance of <typeparamref name="THandlerServiceTypeConcrete"/> for service registeration with the provided /// <see cref="IPayloadHandlerStrategy{TSessionType}"/> strategy. /// </summary> /// <param name="strat"></param> /// <returns></returns> protected abstract THandlerServiceTypeConcrete CreateConcreteService(IMessageHandlerStrategy<TPeerType, TNetworkMessageType> strat);