import "bond/core/bond.bond"
namespace Examples
using guid = bond.GUID;
struct Example
{
0: guid id;
}
public static class BondTypeAliasConverter
{
public static Guid Convert(GUID value, Guid unused)
{
return default(Guid);
}
public static GUID Convert(Guid value, GUID unused)
{
return default(GUID);
}
}
System.TypeInitializationException was unhandled
HResult=-2146233036
Message=The type initializer for 'Cache`2' threw an exception.
Source=Bond
TypeName=Cache`2
StackTrace:
at Bond.Serialize.To[W,T](W writer, T obj)
at Examples.Program.Main() in C:\Users\kylemc\Desktop\ToSave\ToSave\guid\program.cs:line 34
at System.AppDomain._nExecuteAssembly(RuntimeAssembly assembly, String[] args)
at System.AppDomain.ExecuteAssembly(String assemblyFile, Evidence assemblySecurity, String[] args)
at Microsoft.VisualStudio.HostingProcess.HostProc.RunUsersAssembly()
at System.Threading.ThreadHelper.ThreadStart_Context(Object state)
at System.Threading.ExecutionContext.RunInternal(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state, Boolean preserveSyncCtx)
at System.Threading.ExecutionContext.Run(ExecutionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ThreadHelper.ThreadStart()
InnerException:
HResult=-2147467261
Message=Value cannot be null.
Parameter name: field
ParamName=field
Source=System.Core
StackTrace:
at System.Linq.Expressions.Expression.Field(Expression expression, FieldInfo field)
at Bond.Expressions.DataExpression.PropertyOrField(Expression expression, String name)
at Bond.Expressions.ObjectParser.Field(ITransform transform, Expression structVar, UInt16 id, ISchemaField schemaField, IField field)
at Bond.Expressions.ObjectParser.<>c__DisplayClassc.<Apply>b__7(<>f__AnonymousType0`2 <>h__TransparentIdentifier0, IField knownField)
at System.Linq.Enumerable.<SelectManyIterator>d__4`3.MoveNext()
at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
at Bond.Expressions.ObjectParser.Apply(ITransform transform)
at Bond.Expressions.SerializerTransform`2.Struct(IParser parser, RuntimeSchema schema, Boolean isBase)
at Bond.Expressions.SerializerTransform`2.Struct(IParser parser, RuntimeSchema schema)
at Bond.Expressions.SerializerTransform`2.<>c__DisplayClass2.<GenerateSerialize>b__0(IParser p)
at Bond.Expressions.SerializerGenerator`2.GenerateSerialize(Serialize serialize, IParser parser, ParameterExpression writer, Boolean inline)
at Bond.Expressions.SerializerTransform`2.GenerateSerialize(SerializeWithSchema serializeWithSchema, IParser parser, RuntimeSchema schema)
at Bond.Expressions.SerializerTransform`2.Value(IParser parser, Expression valueType, RuntimeSchema schema)
at Bond.Expressions.SerializerTransform`2.<>c__DisplayClassc.<>c__DisplayClasse.<Struct>b__7(IParser fieldParser, Expression fieldType)
at Bond.Expressions.Field.Bond.Expressions.IField.Value(IParser parser, Expression valueType)
at Bond.Expressions.ObjectParser.Field(ITransform transform, Expression structVar, UInt16 id, ISchemaField schemaField, IField field)
at Bond.Expressions.ObjectParser.<>c__DisplayClassc.<Apply>b__7(<>f__AnonymousType0`2 <>h__TransparentIdentifier0, IField knownField)
at System.Linq.Enumerable.<SelectManyIterator>d__4`3.MoveNext()
at System.Collections.Generic.List`1.InsertRange(Int32 index, IEnumerable`1 collection)
at Bond.Expressions.ObjectParser.Apply(ITransform transform)
at Bond.Expressions.SerializerTransform`2.Struct(IParser parser, RuntimeSchema schema, Boolean isBase)
at Bond.Expressions.SerializerTransform`2.Struct(IParser parser, RuntimeSchema schema)
at Bond.Expressions.SerializerTransform`2.<>c__DisplayClass2.<GenerateSerialize>b__0(IParser p)
at Bond.Expressions.SerializerGenerator`2.GenerateSerialize(Serialize serialize, IParser parser, ParameterExpression writer, Boolean inline)
at Bond.Expressions.SerializerTransform`2.GenerateSerialize(SerializeWithSchema serializeWithSchema, IParser parser, RuntimeSchema schema)
at Bond.Expressions.SerializerTransform`2.Generate(IParser parser)
at Bond.Serializer`1..ctor(Type type)
at Bond.Serialize.Cache`2..cctor()
InnerException: