net-ipfs-engine
net-ipfs-engine copied to clipboard
CBOR and dynamic class
CBOR is failing only on netcoreapp 2.0
var obj = new { simple = "object" };
var cid = await ipfs.Dag.PutAsync(obj, multiHash: "sha3-512");
Failed Example1
Error Message:
Test method Ipfs.Engine.DagApiTest.Example1 threw exception:
System.ArgumentNullException: Value cannot be null.
Parameter name: type
Stack Trace:
at System.Reflection.RuntimeReflectionExtensions.GetRuntimeMethod(Type type, String name, Type[] parameters)
at PeterO.DebugUtility.Log(String str)
at PeterO.Cbor.PropertyMap.HasCustomAttribute(Type t, String name)
at PeterO.Cbor.PropertyMap.GetPropertyList(Type t)
at PeterO.Cbor.PropertyMap.<GetProperties>d__22.MoveNext()
at PeterO.Cbor.CBORObject.FromObject(Object obj, PODOptions options)
at Ipfs.Engine.CoreApi.DagApi.<PutAsync>d__8.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at Ipfs.Engine.DagApiTest.<Example1>d__11.MoveNext() in C:\Users\Owner\Documents\GitHub\net-ipfs-engine\test\CoreApi\DagApiTest.cs:line 125
--- End of stack trace from previous location where exception was thrown ---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)```
That is due to a logging call that was commented out as of the latest release.