#include "src/compiler/csharp_generator.h"
#include <cctype>
#include <map>
#include <sstream>
#include <vector>
#include "src/compiler/config.h"
#include "src/compiler/csharp_generator_helpers.h"
Descriptor;
FileDescriptor;
MethodDescriptor;
ServiceDescriptor;
Printer;
StringOutputStream;
StringReplace;
vector;
namespace grpc_csharp_generator {
namespace {
bool GenerateDocCommentBodyImpl(grpc::protobuf::io::Printer* printer,
grpc::protobuf::SourceLocation location) { … }
void GenerateGeneratedCodeAttribute(grpc::protobuf::io::Printer* printer) { … }
template <typename DescriptorType>
bool GenerateDocCommentBody(grpc::protobuf::io::Printer* printer,
const DescriptorType* descriptor) { … }
void GenerateDocCommentServerMethod(grpc::protobuf::io::Printer* printer,
const MethodDescriptor* method) { … }
void GenerateDocCommentClientMethod(grpc::protobuf::io::Printer* printer,
const MethodDescriptor* method,
bool is_sync, bool use_call_options) { … }
std::string GetServiceClassName(const ServiceDescriptor* service) { … }
std::string GetClientClassName(const ServiceDescriptor* service) { … }
std::string GetServerClassName(const ServiceDescriptor* service) { … }
std::string GetCSharpMethodType(const MethodDescriptor* method) { … }
std::string GetCSharpServerMethodType(const MethodDescriptor* method) { … }
std::string GetServiceNameFieldName() { … }
std::string GetMarshallerFieldName(const Descriptor* message) { … }
std::string GetMethodFieldName(const MethodDescriptor* method) { … }
std::string GetMethodRequestParamMaybe(const MethodDescriptor* method,
bool invocation_param = false) { … }
std::string GetAccessLevel(bool internal_access) { … }
std::string GetMethodReturnTypeClient(const MethodDescriptor* method) { … }
std::string GetMethodRequestParamServer(const MethodDescriptor* method) { … }
std::string GetMethodReturnTypeServer(const MethodDescriptor* method) { … }
std::string GetMethodResponseStreamMaybe(const MethodDescriptor* method) { … }
std::vector<const Descriptor*> GetUsedMessages(
const ServiceDescriptor* service) { … }
void GenerateMarshallerFields(Printer* out, const ServiceDescriptor* service) { … }
void GenerateStaticMethodField(Printer* out, const MethodDescriptor* method) { … }
void GenerateServiceDescriptorProperty(Printer* out,
const ServiceDescriptor* service) { … }
void GenerateServerClass(Printer* out, const ServiceDescriptor* service) { … }
void GenerateClientStub(Printer* out, const ServiceDescriptor* service) { … }
void GenerateBindServiceMethod(Printer* out, const ServiceDescriptor* service) { … }
void GenerateBindServiceWithBinderMethod(Printer* out,
const ServiceDescriptor* service) { … }
void GenerateService(Printer* out, const ServiceDescriptor* service,
bool generate_client, bool generate_server,
bool internal_access) { … }
}
std::string GetServices(const FileDescriptor* file, bool generate_client,
bool generate_server, bool internal_access) { … }
}