... | ... | @@ -132,7 +132,7 @@ To do that, open the `Options` dialog under `Tools|Options` and go to `Text Edit |
|
|
![13_edit_project_file](uploads/75ceee6c6cf15c63e14c000920eef4d9/13_edit_project_file.png)
|
|
|
|
|
|
2. Add the following code:
|
|
|
```
|
|
|
```xml
|
|
|
<ItemGroup>
|
|
|
<SilaFeature Include="features\MyFirstFeature.sila.xml" Link="features\%(Filename)%(Extension)"/>
|
|
|
</ItemGroup>
|
... | ... | @@ -150,7 +150,33 @@ This generates the follwing files in the intermediate files folder `obj` after c |
|
|
![14_generated_files](uploads/c8d13302ccfeb6dc6cc46cba58372a1a/14_generated_files.png)
|
|
|
|
|
|
The generated proto file:
|
|
|
![15_proto_file](uploads/b614effc254d09e6d3b7412a54675492/15_proto_file.png)
|
|
|
```protobuf
|
|
|
syntax = "proto3";
|
|
|
|
|
|
import "SiLAFramework.proto";
|
|
|
|
|
|
package sila2.org.silastandard.examples.myfirstfeature.v1;
|
|
|
|
|
|
service MyFirstFeature {
|
|
|
rpc CountCharacters(sila2.org.silastandard.examples.myfirstfeature.v1.CountCharacters_Parameters) returns (sila2.org.silastandard.examples.myfirstfeature.v1.CountCharacters_Responses) {}
|
|
|
rpc Get_DayOfWeek(sila2.org.silastandard.examples.myfirstfeature.v1.Get_DayOfWeek_Parameters) returns (sila2.org.silastandard.examples.myfirstfeature.v1.Get_DayOfWeek_Responses) {}
|
|
|
}
|
|
|
|
|
|
message CountCharacters_Parameters {
|
|
|
sila2.org.silastandard.String InputString = 1;
|
|
|
}
|
|
|
|
|
|
message CountCharacters_Responses {
|
|
|
sila2.org.silastandard.Integer NumberOfCharacters = 1;
|
|
|
}
|
|
|
|
|
|
message Get_DayOfWeek_Parameters {
|
|
|
}
|
|
|
|
|
|
message Get_DayOfWeek_Responses {
|
|
|
sila2.org.silastandard.String DayOfWeek = 1;
|
|
|
}
|
|
|
```
|
|
|
|
|
|
### Implement gRPC Server Call Handler
|
|
|
|
... | ... | |