Пример #1
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="heliumActorSystem">Helium Actor System</param>
        /// <param name="thuriaSerializer">Thuria Serializer</param>
        /// <param name="responseNegotiator">Nancy Response Negotiator</param>
        /// <param name="thuriaLogger">Thuria Logger</param>
        public HeliumInsertModule(IThuriaActorSystem heliumActorSystem, IThuriaSerializer thuriaSerializer, IResponseNegotiator responseNegotiator, IThuriaLogger thuriaLogger)
            : base(thuriaSerializer, responseNegotiator, thuriaLogger)
        {
            _heliumActorSystem = heliumActorSystem ?? throw new ArgumentNullException(nameof(heliumActorSystem));

            Post("/insert", async(parameters, token) => await ProcessRequest());

            ThuriaLogger.LogMessage(LogSeverity.Info, "Helium Insert ready to receive requests");
        }
Пример #2
0
 /// <summary>
 /// Constructor
 /// </summary>
 /// <param name="thuriaSerializer">Thuria Serializer</param>
 /// <param name="responseNegotiator">Nancy Response Negotiator</param>
 /// <param name="thuriaLogger">Thuria Logger</param>
 protected HeliumBaseModule(IThuriaSerializer thuriaSerializer, IResponseNegotiator responseNegotiator, IThuriaLogger thuriaLogger)
     : base("helium")
 {
     _responseNegotiator = responseNegotiator ?? throw new ArgumentNullException(nameof(responseNegotiator));
     ThuriaSerializer    = thuriaSerializer ?? throw new ArgumentNullException(nameof(thuriaSerializer));
     ThuriaLogger        = thuriaLogger ?? throw new ArgumentNullException(nameof(thuriaLogger));
 }