@ -44,6 +44,7 @@ class CSharpGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
bool generate_server = true ;
bool generate_server = true ;
bool internal_access = false ;
bool internal_access = false ;
std : : string base_namespace = " " ;
std : : string base_namespace = " " ;
bool base_namespace_present = false ;
// the suffix that will get appended to the name generated from the name
// the suffix that will get appended to the name generated from the name
// of the original .proto file
// of the original .proto file
@ -62,6 +63,7 @@ class CSharpGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
// The option may be removed or file names generated may change
// The option may be removed or file names generated may change
// in the future.
// in the future.
base_namespace = options [ i ] . second ;
base_namespace = options [ i ] . second ;
base_namespace_present = true ;
} else {
} else {
* error = " Unknown generator option: " + options [ i ] . first ;
* error = " Unknown generator option: " + options [ i ] . first ;
return false ;
return false ;
@ -77,7 +79,8 @@ class CSharpGrpcGenerator : public grpc::protobuf::compiler::CodeGenerator {
// Get output file name.
// Get output file name.
std : : string file_name ;
std : : string file_name ;
if ( ! grpc_csharp_generator : : ServicesFilename (
if ( ! grpc_csharp_generator : : ServicesFilename (
file , file_suffix , base_namespace , file_name , error ) ) {
file , file_suffix , base_namespace_present , base_namespace ,
file_name , error ) ) {
return false ;
return false ;
}
}
std : : unique_ptr < grpc : : protobuf : : io : : ZeroCopyOutputStream > output (
std : : unique_ptr < grpc : : protobuf : : io : : ZeroCopyOutputStream > output (