Skip to content
This repository has been archived by the owner on Aug 18, 2021. It is now read-only.

Feature/csharp #40

Closed
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
/node_modules
/swiftgrpc.log
*.pyc
**/bin
**/obj
**/.vs
15 changes: 14 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ empty :=
space := $(empty) $(empty)
comma := ,

languages := go java js php ruby python c swift
languages := go java js php ruby python c swift csharp

.PHONY: all

Expand Down Expand Up @@ -160,3 +160,16 @@ postprocess/swift:

clean/swift:
find . -name '*.swift' -delete

.PHONY: %.pb.csharp

csharp_replace := -pe 's!global::Gogoproto\.GogoReflection\.Descriptor, !!;'

%.pb.csharp: %.proto
@$(PROTOC) --csharp_out=$(PROTOC_API_PATH)/csharp --csharp_opt=base_namespace=TheThingsNetwork $(PROTOC_API_PATH)/$<

postprocess/csharp:
@find . -type f -name '*.cs' -exec perl -i $(csharp_replace) {} \;

clean/csharp:
rm -rf csharp/API
1 change: 1 addition & 0 deletions api.pb.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// https://github.com/apple/swift-protobuf/

// Copyright © 2017 The Things Network
//
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

import Foundation
Expand Down
1 change: 1 addition & 0 deletions broker/broker.pb.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
// https://github.com/apple/swift-protobuf/

// Copyright © 2017 The Things Network
//
// Use of this source code is governed by the MIT license that can be found in the LICENSE file.

import Foundation
Expand Down
13 changes: 13 additions & 0 deletions csharp/API.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netstandard2.1</TargetFramework>
<PackageId>TheThingsNetwork.Api</PackageId>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Google.Api.Gax.Grpc" Version="3.0.0" />
<PackageReference Include="Google.Protobuf" Version="3.12.3" />
</ItemGroup>

</Project>