Skip to content

Commit 9cb85bd

Browse files
authored
Merge pull request #77 from TorstenDittmann/master
rebrand c# to .net
2 parents f0a6ecf + ff729af commit 9cb85bd

File tree

18 files changed

+61
-54
lines changed

18 files changed

+61
-54
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ $sdk->generate(__DIR__ . '/examples/php'); // Generate source code
102102
| Python | 3.5+ | [PEP8] | PIP | [@eldadfux] |
103103
| Dart | | [Effective Dart] | pub tool | [You?](https://github.com/appwrite/sdk-generator/issues/20) |
104104
| Go | | [Effective Go] | go get | [@panz3r] |
105-
| CSharp | .NET core 3.1 | [C# Coding Conventions]| ? | [@komemi] [@TorstenDittmann] |
105+
| .NET | .NET core 3.1 | [C# Coding Conventions]| NuGet | [@komemi] [@TorstenDittmann] |
106106
| D | | | ? | [You?](https://github.com/appwrite/sdk-generator/issues/20) |
107107
| Kotlin | | | ? | [You?](https://github.com/appwrite/sdk-generator/issues/20) |
108108
| Swift | | | Swift Pkg Manager | [@armino-dev] |
@@ -113,7 +113,7 @@ $sdk->generate(__DIR__ . '/examples/php'); // Generate source code
113113
[@armino-dev]: https://github.com/armino-dev
114114
[@bartektartanus]: https://github.com/bartektartanus
115115
[@komemi]: https://github.com/komemi
116-
[@TorstenDittmann]: https://github.com/TorstenDittmann
116+
[@TorstenDittmann]: https://github.com/TorstenDittmann
117117

118118
[PHP FIG]: https://www.php-fig.org/
119119
[NPM Coding Style]: https://docs.npmjs.com/misc/coding-style

example.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
use Appwrite\SDK\Language\Deno;
1717
use Appwrite\SDK\Language\HTTP;
1818
use Appwrite\SDK\Language\Swift;
19-
use Appwrite\SDK\Language\CSharp;
19+
use Appwrite\SDK\Language\DotNet;
2020
use Appwrite\SDK\Language\Flutter;
2121

2222
try {
@@ -272,8 +272,8 @@ function getSSLPage($url) {
272272

273273
$sdk->generate(__DIR__ . '/examples/swift');
274274

275-
// CSharp
276-
$sdk = new SDK(new CSharp(), new Swagger2($spec));
275+
// DotNet
276+
$sdk = new SDK(new DotNet(), new Swagger2($spec));
277277

278278
$sdk
279279
->setName('NAME')
@@ -289,7 +289,7 @@ function getSSLPage($url) {
289289
->setGitRepoName('reponame')
290290
;
291291

292-
$sdk->generate(__DIR__ . '/examples/csharp');
292+
$sdk->generate(__DIR__ . '/examples/dotnet');
293293

294294
}
295295
catch (Exception $exception) {

src/SDK/Language/CSharp.php renamed to src/SDK/Language/DotNet.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@
44

55
use Appwrite\SDK\Language;
66

7-
class CSharp extends Language {
7+
class DotNet extends Language {
88

99
/**
1010
* @return string
1111
*/
1212
public function getName()
1313
{
14-
return 'CSharp';
14+
return 'DotNet';
1515
}
1616

1717
/**
@@ -234,74 +234,74 @@ public function getFiles()
234234
[
235235
'scope' => 'default',
236236
'destination' => 'README.md',
237-
'template' => '/csharp/README.md.twig',
237+
'template' => '/dotnet/README.md.twig',
238238
'minify' => false,
239239
],
240240
[
241241
'scope' => 'default',
242242
'destination' => 'CHANGELOG.md',
243-
'template' => '/csharp/CHANGELOG.md.twig',
243+
'template' => '/dotnet/CHANGELOG.md.twig',
244244
'minify' => false,
245245
],
246246
[
247247
'scope' => 'default',
248248
'destination' => 'LICENSE',
249-
'template' => '/csharp/LICENSE.twig',
249+
'template' => '/dotnet/LICENSE.twig',
250250
'minify' => false,
251251
],
252252
[
253253
'scope' => 'method',
254254
'destination' => 'docs/examples/{{service.name | caseLower}}/{{method.name | caseDash}}.md',
255-
'template' => '/csharp/docs/example.md.twig',
255+
'template' => '/dotnet/docs/example.md.twig',
256256
'minify' => false,
257257
],
258258
[
259259
'scope' => 'default',
260260
'destination' => '/src/Appwrite.sln',
261-
'template' => '/csharp/src/Appwrite.sln',
261+
'template' => '/dotnet/src/Appwrite.sln',
262262
'minify' => false,
263263
],
264264
[
265265
'scope' => 'default',
266266
'destination' => '/src/Appwrite/Appwrite.csproj',
267-
'template' => '/csharp/src/Appwrite/Appwrite.csproj',
267+
'template' => '/dotnet/src/Appwrite/Appwrite.csproj.twig',
268268
'minify' => false,
269269
],
270270
[
271271
'scope' => 'default',
272272
'destination' => '/{{ sdk.namespace | caseSlash }}/src/Appwrite/Client.cs',
273-
'template' => '/csharp/src/Appwrite/Client.cs.twig',
273+
'template' => '/dotnet/src/Appwrite/Client.cs.twig',
274274
'minify' => false,
275275
],
276276
[
277277
'scope' => 'default',
278278
'destination' => '/{{ sdk.namespace | caseSlash }}/src/Appwrite/Helpers/ExtensionMethods.cs',
279-
'template' => '/csharp/src/Appwrite/Helpers/ExtensionMethods.cs',
279+
'template' => '/dotnet/src/Appwrite/Helpers/ExtensionMethods.cs',
280280
'minify' => false,
281281
],
282282
[
283283
'scope' => 'default',
284284
'destination' => '/{{ sdk.namespace | caseSlash }}/src/Appwrite/Models/OrderType.cs',
285-
'template' => '/csharp/src/Appwrite/Models/OrderType.cs.twig',
285+
'template' => '/dotnet/src/Appwrite/Models/OrderType.cs.twig',
286286
'minify' => false,
287287
],
288288
[
289289
'scope' => 'default',
290290
'destination' => '/{{ sdk.namespace | caseSlash }}/src/Appwrite/Models/Rule.cs',
291-
'template' => '/csharp/src/Appwrite/Models/Rule.cs.twig',
291+
'template' => '/dotnet/src/Appwrite/Models/Rule.cs.twig',
292292
'minify' => false,
293293
],
294294

295295
[
296296
'scope' => 'default',
297297
'destination' => '/{{ sdk.namespace | caseSlash }}/src/Appwrite/Services/Service.cs',
298-
'template' => '/csharp/src/Appwrite/Services/Service.cs.twig',
298+
'template' => '/dotnet/src/Appwrite/Services/Service.cs.twig',
299299
'minify' => false,
300300
],
301301
[
302302
'scope' => 'service',
303303
'destination' => '/{{ sdk.namespace | caseSlash }}/src/Appwrite/Services/{{service.name | caseUcfirst}}.cs',
304-
'template' => '/csharp/src/Appwrite/Services/ServiceTemplate.cs.twig',
304+
'template' => '/dotnet/src/Appwrite/Services/ServiceTemplate.cs.twig',
305305
'minify' => false,
306306
]
307307
];

templates/csharp/src/Appwrite/Appwrite.csproj

Lines changed: 0 additions & 11 deletions
This file was deleted.
File renamed without changes.
File renamed without changes.

templates/csharp/README.md.twig renamed to templates/dotnet/README.md.twig

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,31 +9,28 @@
99

1010
{{ sdk.description }}
1111

12-
13-
1412
![{{ spec.title }}]({{ sdk.logo }})
1513

1614
## Installation
1715

18-
### Maven
19-
Add this to your project's `pom.xml` file:
16+
### .NET
17+
Add this reference to your projects's `.csproj` file:
2018

2119
```xml
22-
<dependencies>
23-
<dependency>
24-
<groupId>com.squareup.okhttp3</groupId>
25-
<artifactId>{{ spec.title | caseDash }}</artifactId>
26-
<version>{{sdk.version}}</version>
27-
</dependency>
28-
</dependencies>
20+
<PackageReference Include="{{ spec.title | caseUcfirst }}" Version="{{ sdk.version }}" />
2921
```
3022

3123
You can install packages from the command line:
3224

33-
```bash
34-
mvn install {{ spec.title | caseDash }}
25+
```powershell
26+
# Package Manager
27+
Install-Package {{ spec.title | caseUcfirst }} -Version {{ sdk.version }}
28+
29+
# or .NET CLI
30+
dotnet add package {{ spec.title | caseUcfirst }} --version {{ sdk.version }}
3531
```
3632

33+
3734
## Contribution
3835

3936
This library is auto-generated by Appwrite custom [SDK Generator](https://github.com/appwrite/sdk-generator). To learn more about how you can help us improve this SDK, please check the [contribution guide](https://github.com/appwrite/sdk-generator/blob/master/CONTRIBUTING.md) before sending a pull-request.
File renamed without changes.
File renamed without changes.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<Project Sdk="Microsoft.NET.Sdk">
2+
<PropertyGroup>
3+
<TargetFramework>netcoreapp3.1</TargetFramework>
4+
<PackageId>{{spec.title}}</PackageId>
5+
<Version>{{sdk.version}}</Version>
6+
<Authors>{{spec.contactName}}</Authors>
7+
<Company>{{spec.contactName}}</Company>
8+
<Description>
9+
{{sdk.shortDescription}}
10+
</Description>
11+
<PackageLicenseExpression>{{spec.licenseName}}</PackageLicenseExpression>
12+
<PackageProjectUrl>{{sdk.gitURL}}</PackageProjectUrl>
13+
<RepositoryType>git</RepositoryType>
14+
<RepositoryUrl>{{sdk.gitURL}}</RepositoryUrl>
15+
</PropertyGroup>
16+
17+
<ItemGroup>
18+
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
19+
</ItemGroup>
20+
21+
</Project>

0 commit comments

Comments
 (0)