Memcached2 icon indicating copy to clipboard operation
Memcached2 copied to clipboard

I rewrite the itemformatter, but the error is reported. What's the reason

Open ynanech opened this issue 6 years ago • 0 comments

    private uint DoSerialize(SequenceBuilder output, object? value)
    {
        var tmpByteArray = MessagePackSerializer.Serialize(value);
        new SegmentedStream(output).Write(tmpByteArray, 0, tmpByteArray.Length);
        return RawDataFlag;
    }


    private object? DoDeserialize(ReadOnlyMemory<byte> data, uint flags)
    {
        return MessagePackSerializer.Deserialize<object>(data.ToArray());
    }
string aa = "test1";
long dto = 1;
await _client.SetAsync(aa, dto, TimeSpan.FromSeconds(15));

Exception reading: var cc = await _client.GetAsync<long>(aa); Enyim.Caching.Memcached.MemcachedClient.ConvertResult<T>(GetOperationBase op) Enyim.Caching.Memcached.MemcachedClient.Return<T>(GetOperationBase op) ANECH.Framework.WebTest.Controllers.MemcachedController.Index() in MemcachedController.cs + var cc = await _client.GetAsync<long>(aa); Microsoft.AspNetCore.Mvc.Infrastructure.ActionMethodExecutor+TaskOfIActionResultExecutor.Execute(IActionResultTypeMapper mapper, ObjectMethodExecutor executor, object controller, object[] arguments) System.Threading.Tasks.ValueTask<TResult>.get_Result() System.Runtime.CompilerServices.ValueTaskAwaiter<TResult>.GetResult() Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeActionMethodAsync>g__Logged|12_1(ControllerActionInvoker invoker) Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeNextActionFilterAsync>g__Awaited|10_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Rethrow(ActionExecutedContextSealed context) Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ControllerActionInvoker.<InvokeInnerFilterAsync>g__Awaited|13_0(ControllerActionInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeNextResourceFilter>g__Awaited|24_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Rethrow(ResourceExecutedContextSealed context) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.Next(ref State next, ref Scope scope, ref object state, ref bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeFilterPipelineAsync>g__Awaited|19_0(ResourceInvoker invoker, Task lastTask, State next, Scope scope, object state, bool isCompleted) Microsoft.AspNetCore.Mvc.Infrastructure.ResourceInvoker.<InvokeAsync>g__Logged|17_1(ResourceInvoker invoker) Microsoft.AspNetCore.Routing.EndpointMiddleware.<Invoke>g__AwaitRequestTask|6_0(Endpoint endpoint, Task requestTask, ILogger logger) Microsoft.AspNetCore.Authorization.AuthorizationMiddleware.Invoke(HttpContext context) Microsoft.AspNetCore.Diagnostics.DeveloperExceptionPageMiddleware.Invoke(HttpContext context)

ynanech avatar Dec 01 '19 04:12 ynanech