1// Protocol Buffers - Google's data interchange format 2// Copyright 2008 Google Inc. All rights reserved. 3// 4// Use of this source code is governed by a BSD-style 5// license that can be found in the LICENSE file or at 6// https://developers.google.com/open-source/licenses/bsd 7 8syntax = "proto2"; 9 10package protobuf_unittest_selfreferential_options; 11 12import "google/protobuf/descriptor.proto"; 13 14option csharp_namespace = "UnitTest.Issues.TestProtos.SelfreferentialOptions"; 15 16message FooOptions { 17 // Custom field option used in definition of the extension message. 18 optional int32 int_opt = 1 [(foo_options) = { 19 int_opt: 1 20 [foo_int_opt]: 2 21 [foo_foo_opt]: { int_opt: 3 } 22 }]; 23 24 // Custom field option used in definition of the custom option's message. 25 optional int32 foo = 2 [(foo_options) = { foo: 1234 }]; 26 27 extensions 1000 to max; 28} 29 30extend google.protobuf.FieldOptions { 31 // Custom field option used on the definition of that field option. 32 optional int32 bar_options = 1000 [(bar_options) = 1234]; 33 34 optional FooOptions foo_options = 1001; 35} 36 37extend FooOptions { 38 optional int32 foo_int_opt = 1000; 39 optional FooOptions foo_foo_opt = 1001; 40} 41