mirror of
https://github.com/protocolbuffers/protobuf
synced 2026-08-26 02:23:14 -04:00
55 lines
1.5 KiB
Protocol Buffer
55 lines
1.5 KiB
Protocol Buffer
// Protocol Buffers - Google's data interchange format
|
|
// Copyright 2026 Google Inc. All rights reserved.
|
|
//
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file or at
|
|
// https://developers.google.com/open-source/licenses/bsd
|
|
|
|
edition = "2026";
|
|
|
|
package protobuf_editionstesting;
|
|
|
|
import "csharp/protos/unittest_import_proto3.proto";
|
|
import "csharp/protos/unittest.proto";
|
|
|
|
import option "csharp/google/protobuf/c_sharp_features.proto";
|
|
option features.(pb.csharp).nullable_reference_types = true;
|
|
option csharp_namespace = "Google.Protobuf.TestProtos";
|
|
|
|
// This file is used for testing NRT support in C#, both in terms of
|
|
// manual inspection of the generated code, and checking that it compiles.
|
|
// It exercises many aspects of protobuf, but does not attempt to be
|
|
// comprehensive in checking (for example) all primitive numeric types.
|
|
|
|
extend protobuf_unittest_proto2.TestAllExtensions {
|
|
int32 int32_ext = 1234567;
|
|
string string_ext = 1234568;
|
|
protobuf_unittest_proto2.TestAllExtensions message_ext = 1234569;
|
|
}
|
|
|
|
message NrtMessage {
|
|
protobuf_unittest_import.ImportMessage proto3_import_message = 1;
|
|
OtherNrtMessage other_message = 2;
|
|
string text = 3;
|
|
int32 integer = 4;
|
|
bytes blob = 5;
|
|
NrtEnum enum_field = 6;
|
|
|
|
message NestedMessage {
|
|
string text = 1;
|
|
}
|
|
}
|
|
|
|
message OtherNrtMessage {
|
|
string text = 1;
|
|
}
|
|
|
|
message ExtendableNrtMessage {
|
|
extensions 65536 to max;
|
|
}
|
|
|
|
enum NrtEnum {
|
|
NRT_ENUM_UNSPECIFIED = 0;
|
|
FOO = 1;
|
|
BAR = 2;
|
|
}
|