|
| 1 | +//HintName: TestNamespace.Person.g.cs |
| 2 | +// <auto-generated/> |
| 3 | +#pragma warning disable 612,618 |
| 4 | +using System; |
| 5 | +using System.Runtime.CompilerServices; |
| 6 | + |
| 7 | +namespace TestNamespace; |
| 8 | + |
| 9 | +[CompilerGenerated] |
| 10 | +static file class PersonRegistration |
| 11 | +{ |
| 12 | + [UnsafeAccessor(UnsafeAccessorKind.Constructor)] |
| 13 | + extern static global::TestNamespace.Person Creator(); |
| 14 | + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Name>k__BackingField")] |
| 15 | + extern static ref string Field1(global::TestNamespace.Person @this); |
| 16 | + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<Id2Names>k__BackingField")] |
| 17 | + extern static ref global::System.Collections.Generic.IDictionary<int, (string, string)> Field2(global::TestNamespace.Person @this); |
| 18 | + [UnsafeAccessor(UnsafeAccessorKind.Field, Name = "<NameSet2>k__BackingField")] |
| 19 | + extern static ref global::System.Collections.Generic.ISet<(string, int)> Field3(global::TestNamespace.Person @this); |
| 20 | + [ModuleInitializer] |
| 21 | + internal static unsafe void Register4BTDB() |
| 22 | + { |
| 23 | + global::BTDB.IOC.IContainer.RegisterFactory(typeof(global::TestNamespace.Person), (container, ctx) => |
| 24 | + { |
| 25 | + return (container2, ctx2) => |
| 26 | + { |
| 27 | + var res = new global::TestNamespace.Person(); |
| 28 | + return res; |
| 29 | + }; |
| 30 | + }); |
| 31 | + var metadata = new global::BTDB.Serialization.ClassMetadata(); |
| 32 | + metadata.Name = "Person"; |
| 33 | + metadata.Type = typeof(global::TestNamespace.Person); |
| 34 | + metadata.Namespace = "TestNamespace"; |
| 35 | + metadata.Implements = []; |
| 36 | + metadata.Creator = &Creator; |
| 37 | + var dummy = Unsafe.As<global::TestNamespace.Person>(metadata); |
| 38 | + metadata.Fields = new[] |
| 39 | + { |
| 40 | + new global::BTDB.Serialization.FieldMetadata |
| 41 | + { |
| 42 | + Name = "Name", |
| 43 | + Type = typeof(string), |
| 44 | + ByteOffset = global::BTDB.Serialization.RawData.CalcOffset(dummy, ref Field1(dummy)), |
| 45 | + }, |
| 46 | + new global::BTDB.Serialization.FieldMetadata |
| 47 | + { |
| 48 | + Name = "Id2Names", |
| 49 | + Type = typeof(global::System.Collections.Generic.IDictionary<int, (string, string)>), |
| 50 | + ByteOffset = global::BTDB.Serialization.RawData.CalcOffset(dummy, ref Field2(dummy)), |
| 51 | + }, |
| 52 | + new global::BTDB.Serialization.FieldMetadata |
| 53 | + { |
| 54 | + Name = "NameSet2", |
| 55 | + Type = typeof(global::System.Collections.Generic.ISet<(string, int)>), |
| 56 | + ByteOffset = global::BTDB.Serialization.RawData.CalcOffset(dummy, ref Field3(dummy)), |
| 57 | + }, |
| 58 | + }; |
| 59 | + global::BTDB.Serialization.ReflectionMetadata.Register(metadata); |
| 60 | + } |
| 61 | +} |
0 commit comments