Exemplo n.º 1
0
        protected override async Task OnInitAsync()
        {
            //Logger.LogDebug($"Starting OnInitAsync");
            ////Logger.LogDebug($"Initializing IServiceClient");
            // Someday this will work
            //IServiceClient client = new JsonHttpClient("http://localhost:21100");
            ////Logger.LogDebug($"client is null: {client == null}");
            InitializationReqDTO initializationReqDTO = new InitializationReqDTO();

            //Logger.LogDebug($"Calling PostJsonAsync<BaseServicesInitializationRspPayload>");
            InitializationRspDTO = await HttpClient.PostJsonAsync <InitializationRspDTO>("Initialization",
                                                                                         initializationReqDTO);

            //Logger.LogDebug($"Returned from PostJsonAsync<InitializationRspDTO>, InitializationRspDTO = {InitializationRspDTO}");
            //Logger.LogDebug($"Leaving OnInitAsync");
        }
        // Access the Logging extensions registered in the DI container
        //[Inject]
        //public ILogger<BasicRESTServicesCodeBehind> Logger { get; set; }


        #endregion

        #region Page Initialization Handler
        protected override async Task OnInitAsync()
        {
            //Logger.LogDebug($"Starting OnInitAsync");
            InitializationReqDTO initializationReqDTO = new InitializationReqDTO();

            //Logger.LogDebug($"Calling PostJsonAsync<BaseServicesInitializationRspPayload>");
            InitializationRspDTO = await HttpClient.PostJsonAsync <InitializationRspDTO>("Initialization",
                                                                                         initializationReqDTO);

            //Logger.LogDebug($"Returned from PostJsonAsync<InitializationRspDTO>, InitializationRspDTO: {InitializationRspDTO}");
            // create the instance of the ComplexData to be posted
            reqComplexData = new ComplexData()
            {
                // initialize the fields
                StringData   = "Set By OnInitAsync",
                DateTimeData = DateTime.UtcNow,
                TimeSpanData = default,
Exemplo n.º 3
0
 public object Post(InitializationReqDTO request)
 {
     return(new InitializationRspDTO {
     });
 }