internal OneofDescriptor(OneofDescriptorProto proto, FileDescriptor file, MessageDescriptor parent, int index, string clrName) : base(file, file.ComputeFullName(parent, proto.Name), index) { while (true) { IL_63: uint arg_47_0 = 2329051274u; while (true) { uint num; switch ((num = (arg_47_0 ^ 3026981471u)) % 4u) { case 0u: goto IL_63; case 1u: this.proto = proto; arg_47_0 = (num * 378117375u ^ 1534672859u); continue; case 3u: this.containingType = parent; arg_47_0 = (num * 4267417022u ^ 3727843631u); continue; } goto Block_1; } } Block_1: file.DescriptorPool.AddSymbol(this); this.accessor = this.CreateAccessor(clrName); }
internal OneofDescriptor(OneofDescriptorProto proto, FileDescriptor file, MessageDescriptor parent, int index, string clrName) : base(file, file.ComputeFullName(parent, proto.Name), index) { this.proto = proto; containingType = parent; file.DescriptorPool.AddSymbol(this); accessor = CreateAccessor(clrName); }
internal OneofDescriptor(OneofDescriptorProto proto, FileDescriptor file, MessageDescriptor parent, int index, string clrName) : base(file, file.ComputeFullName(parent, proto.Name), index) { this.Proto = proto; containingType = parent; file.DescriptorPool.AddSymbol(this); // It's useful to determine whether or not this is a synthetic oneof before cross-linking. That means // diving into the proto directly rather than using FieldDescriptor, but that's okay. var firstFieldInOneof = parent.Proto.Field.FirstOrDefault(fieldProto => fieldProto.HasOneofIndex && fieldProto.OneofIndex == index); IsSynthetic = firstFieldInOneof?.Proto3Optional ?? false; accessor = CreateAccessor(clrName); }