You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Optionally if your DTOs do not have nullable reference annotations enabled but you would still like to generate DTOs with them included, you can mark properties as required with the `[Required]` attribute, e.g:
249
+
250
+
```csharp
251
+
publicclassData
252
+
{
253
+
[Required]
254
+
publicstring? Text { get; set; }
255
+
[Required]
256
+
publicList<string>? Texts { get; set; }
257
+
}
258
+
```
259
+
260
+
Where it will generate otherwise optional properties as non-nullable reference types:
When true, annotates Request DTOs with an `IReturn<TResponse>` marker referencing the Response type ServiceStack infers your Service to return:
@@ -448,37 +503,3 @@ This lets you change the default DataContract XML namespace used for all C# name
448
503
```
449
504
450
505
> Requires AddDataContractAttributes=true
451
-
452
-
## Xamarin Studio
453
-
454
-
With the new [ServiceStackXS Add-In](http://addins.monodevelop.com/Project/Index/154) your Service Consumers can now generate typed DTOs of your remote ServiceStack Services directly from within Xamarin Studio, which together with the **ServiceStack.Client** NuGet package provides an effortless way to enable an end-to-end Typed API from within Xamarin C# projects.
455
-
456
-
### Installing ServiceStackXS
457
-
458
-
Installation is straightforward if you've installed Xamarin Add-ins before, just go to `Xamarin Studio -> Add-In Manager...` from the Menu and then search for `ServiceStack` from the **Gallery**:
If you are having trouble with the Xamarin Studio gallery version, you can install addins from an `mpack` file from the same menu as shown above. Click `Install from file` and navigate to where you have downloaded the `mpack` file.
465
-
466
-
### Adding a ServiceStack Reference
467
-
468
-
Once installed, adding a ServiceStack Reference is very similar to [ServiceStackVS in VS.NET](/csharp-add-servicestack-reference#add-servicestack-reference) where you can just click on `Add -> Add ServiceStack Reference...` on the project's context menu to bring up the familiar Add Reference dialog. After adding the `BaseUrl` of the remote ServiceStack instance, click OK to add the generated DTO's to your project using the name specified:
As file watching isn't supported yet, to refresh the generated DTOs, you'll need to right-click on it in the solution explorer and select `Update ServiceStack Reference` from the items context menu.
475
-
476
-
### Xamarin Studio for Linux
477
-
478
-
One of the nice benefits of creating an Xamarin Studio Add-in is that we're also able to bring the same experience to .NET Developers on Linux! Which works similar to OSX where you can install ServiceStackXS from the Add-in Gallery - Here's an example using Ubuntu:
0 commit comments