use of com.google.api.codegen.config.GapicInterfaceContext in project toolkit by googleapis.
the class CSharpGapicSmokeTestTransformer method transform.
@Override
public List<ViewModel> transform(ProtoApiModel model, GapicProductConfig productConfig) {
List<ViewModel> surfaceDocs = new ArrayList<>();
SurfaceNamer namer = new CSharpSurfaceNamer(productConfig.getPackageName(), ALIAS_MODE);
for (InterfaceModel apiInterface : model.getInterfaces(productConfig)) {
if (!productConfig.hasInterfaceConfig(apiInterface)) {
continue;
}
GapicInterfaceContext context = GapicInterfaceContext.create(apiInterface, productConfig, csharpCommonTransformer.createTypeTable(namer.getPackageName(), ALIAS_MODE), namer, new CSharpFeatureConfig());
csharpCommonTransformer.addCommonImports(context);
SmokeTestClassView smokeTests = generateSmokeTest(context);
if (smokeTests != null) {
surfaceDocs.add(smokeTests);
}
}
return surfaceDocs;
}
use of com.google.api.codegen.config.GapicInterfaceContext in project toolkit by googleapis.
the class CSharpBasicPackageTransformer method transform.
@Override
public List<ViewModel> transform(ProtoApiModel model, GapicProductConfig productConfig) {
List<ViewModel> surfaceDocs = new ArrayList<>();
SurfaceNamer namer = new CSharpSurfaceNamer(productConfig.getPackageName(), ALIAS_MODE);
for (InterfaceModel apiInterface : model.getInterfaces(productConfig)) {
if (!productConfig.hasInterfaceConfig(apiInterface)) {
continue;
}
GapicInterfaceContext context = GapicInterfaceContext.create(apiInterface, productConfig, csharpCommonTransformer.createTypeTable(namer.getPackageName(), ALIAS_MODE), namer, new CSharpFeatureConfig());
if (shouldGenerateFn.test(context)) {
surfaceDocs.add(generateCsproj(context));
}
}
return surfaceDocs;
}
Aggregations