Lines Matching refs:Descriptor
49 FileDescriptor file = UnittestProto3Reflection.Descriptor;
59 Assert.AreEqual(1, UnittestImportProto3Reflection.Descriptor.PublicDependencies.Count);
60 Assert.AreEqual(UnittestImportPublicProto3Reflection.Descriptor, UnittestImportProto3Reflection.Descriptor.PublicDependencies[0]);
63 Assert.AreEqual(UnittestImportProto3Reflection.Descriptor, file.Dependencies[0]);
65 MessageDescriptor messageType = TestAllTypes.Descriptor;
80 Assert.AreEqual(1, UnittestImportProto3Reflection.Descriptor.EnumTypes.Count);
81 Assert.AreEqual("ImportEnum", UnittestImportProto3Reflection.Descriptor.EnumTypes[0].Name);
93 MessageDescriptor messageType = TestAllTypes.Descriptor;
94 MessageDescriptor nestedType = TestAllTypes.Types.NestedMessage.Descriptor;
98 Assert.AreEqual(UnittestProto3Reflection.Descriptor, messageType.File);
106 Assert.AreEqual(UnittestProto3Reflection.Descriptor, nestedType.File);
140 MessageDescriptor messageType = TestAllTypes.Descriptor;
150 Assert.AreEqual(UnittestProto3Reflection.Descriptor, primitiveField.File);
160 Assert.AreEqual(ForeignMessage.Descriptor, messageField.MessageType);
167 TestAllTypes.Descriptor.FindDescriptor<FieldDescriptor>("single_int32");
169 TestAllTypes.Descriptor.FindDescriptor<FieldDescriptor>("repeated_int32");
178 // Note: this test is a bit different to the Java version because there's no static way of getting to the descriptor
179 EnumDescriptor enumType = UnittestProto3Reflection.Descriptor.FindTypeByName<EnumDescriptor>("ForeignEnum");
180 EnumDescriptor nestedType = TestAllTypes.Descriptor.FindDescriptor<EnumDescriptor>("NestedEnum");
184 Assert.AreEqual(UnittestProto3Reflection.Descriptor, enumType.File);
191 Assert.AreEqual(UnittestProto3Reflection.Descriptor, nestedType.File);
192 Assert.AreEqual(TestAllTypes.Descriptor, nestedType.ContainingType);
210 OneofDescriptor descriptor = TestAllTypes.Descriptor.FindDescriptor<OneofDescriptor>("oneof_field");
211 Assert.AreEqual("oneof_field", descriptor.Name);
212 Assert.AreEqual("protobuf_unittest.TestAllTypes.oneof_field", descriptor.FullName);
219 .Select(fieldNumber => TestAllTypes.Descriptor.FindFieldByNumber(fieldNumber))
223 Assert.AreSame(descriptor, field.ContainingOneof);
226 CollectionAssert.AreEquivalent(expectedFields, descriptor.Fields);
232 var descriptor = MapWellKnownTypes.Descriptor.NestedTypes[0];
233 Assert.IsNull(descriptor.Parser);
234 Assert.IsNull(descriptor.ClrType);
235 Assert.IsNull(descriptor.Fields[1].Accessor);
246 var fields = TestFieldOrderings.Descriptor.Fields;
255 var descriptor = Google.Protobuf.Reflection.FileDescriptor.DescriptorProtoFileDescriptor;
256 Assert.AreEqual("google/protobuf/descriptor.proto", descriptor.Name);