Skip to content

Commit da12622

Browse files
authored
adding links to reference docs & other cleanup (#546)
* adding links to reference docs & other cleanup
1 parent e6b9871 commit da12622

File tree

10 files changed

+32
-90
lines changed

10 files changed

+32
-90
lines changed

examples/dotnet/Examples/WorkWithRealm.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,14 +67,14 @@ public async System.Threading.Tasks.Task APIKeys()
6767
{
6868
//:code-block-start:apikey-create
6969
var newKey = await user.ApiKeys.CreateAsync("someKeyName");
70-
Console.WriteLine($"I created a key named {newKey.Name}. " +
70+
Console.WriteLine($"I created a key named {newKey.Name}. " +
7171
$"Is it enabled? {newKey.IsEnabled}");
7272
//:code-block-end:
7373
}
7474
{
7575
//:code-block-start:apikey-fetch
7676
var key = await user.ApiKeys.FetchAsync(ObjectId.Parse("00112233445566778899aabb"));
77-
Console.WriteLine($"I fetched the key named {key.Name}. " +
77+
Console.WriteLine($"I fetched the key named {key.Name}. " +
7878
$"Is it enabled? {key.IsEnabled}");
7979
//:code-block-end:
8080
}
@@ -83,7 +83,7 @@ public async System.Threading.Tasks.Task APIKeys()
8383
var allKeys = await user.ApiKeys.FetchAllAsync();
8484
foreach (var key in allKeys)
8585
{
86-
Console.WriteLine($"I fetched the key named {key.Name}. " +
86+
Console.WriteLine($"I fetched the key named {key.Name}. " +
8787
$"Is it enabled? {key.IsEnabled}");
8888
}
8989
//:code-block-end:

source/dotnet/migrations.txt

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,9 @@ deletes it.
8181
``fullName`` based on the existing ``firstName`` and ``lastName``
8282
properties:
8383

84-
.. tabs-realm-languages::
85-
86-
87-
.. tab::
88-
:tabid: c-sharp
89-
90-
.. literalinclude:: /examples/Migrations/LocalMigration/LocalMigration.cs
91-
:language: csharp
92-
:emphasize-lines: 3, 15
84+
.. literalinclude:: /examples/Migrations/LocalMigration/LocalMigration.cs
85+
:language: csharp
86+
:emphasize-lines: 3, 15
9387

9488

9589
.. _dotnet-synced-migration:

source/dotnet/objects.txt

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,8 @@ class implementation.
3636
optionally include the dog's ``breed`` and a reference to a Person
3737
object that represents the dog's ``owner``.
3838

39-
.. tabs-realm-languages::
40-
41-
.. tab::
42-
:tabid: c-sharp
43-
44-
.. literalinclude:: /examples/Schemas/DogSchema.cs
45-
:language: csharp
39+
.. literalinclude:: /examples/Schemas/DogSchema.cs
40+
:language: csharp
4641

4742

4843
Key Concepts
@@ -103,7 +98,7 @@ created, modified, or deleted.
10398
Primary Key
10499
~~~~~~~~~~~
105100

106-
A **primary key** is a String or Integer property that uniquely
101+
A **primary key** is a string or integer property that uniquely
107102
identifies an object. You may optionally define a primary key for an
108103
object type as part of the :ref:`object schema <dotnet-object-schema>`.
109104
{+client-database+} automatically indexes primary key properties, which

source/dotnet/open-a-realm.txt

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,16 +14,21 @@ Open and Close a Realm
1414

1515
Open a Synced Realm
1616
-------------------
17-
To open a synced {+realm+}, call the ``GetInstanceAsync()`` method,
18-
passing in a ``SyncConfiguration`` object that includes the partition name and
17+
To open a synced {+realm+}, call the
18+
:dotnet-sdk:`GetInstanceAsync() <reference/Realms.Realm.html#Realms_Realm_GetInstanceAsync_Realms_RealmConfigurationBase_System_Threading_CancellationToken_>`
19+
method, passing in a
20+
:dotnet-sdk:`SyncConfiguration <reference/Realms.Sync.SyncConfiguration.html>`
21+
object that includes the partition name and
1922
the user. The following code demonstrates this:
2023

2124
.. literalinclude:: /examples/generated/code/start/Examples.codeblock.open-synced-realm.cs
2225
:language: csharp
2326

2427
In the above example, the code shows how to open the {+realm+} *asynchronously*
25-
by calling ``GetInstanceAsync``. You can also open a {+realm+} *synchronously*
26-
by calling ``GetInstance``, which is necessary if the device is offline.
28+
by calling ``GetInstanceAsync()``. You can also open a {+realm+} *synchronously*
29+
by calling the
30+
:dotnet-sdk:`GetInstance() <reference/Realms.Realm.html#Realms_Realm_GetInstance_System_String_>`
31+
method, which is necessary if the device is offline.
2732

2833
.. literalinclude:: /examples/generated/code/start/Examples.codeblock.open-synced-realm-sync.cs
2934
:language: csharp
@@ -37,8 +42,9 @@ by calling ``GetInstance``, which is necessary if the device is offline.
3742

3843
Open a Local (Non-Synced) Realm
3944
-------------------------------
40-
When opening a local (non-synced) {+realm+}, pass a ``RealmConfiguration``
41-
object to either ``GetInstanceAsync`` or ``GetInstance``. The following example
45+
When opening a local (non-synced) {+realm+}, pass a
46+
:dotnet-sdk:`RealmConfiguration <reference/Realms.RealmConfiguration.html#Realms_RealmConfiguration__ctor_System_String_>`
47+
object to either ``GetInstanceAsync()`` or ``GetInstance()``. The following example
4248
creates a ``RealmConfiguration`` object with a local file path, sets the
4349
``IsReadOnly`` property to ``true``, and then opens a local {+realm+} with that
4450
configuration information:
@@ -58,7 +64,8 @@ object with a ``using`` statement, or wrapping the code that interacts with a
5864
:language: csharp
5965

6066
If you require a realm object to be shared outside of a single method, be sure
61-
to manage its state by calling ``Dispose()``:
67+
to manage its state by calling the
68+
:dotnet-sdk:`Dispose() <reference/Realms.Realm.html#Realms_Realm_Dispose>` method:
6269

6370
.. literalinclude:: /examples/generated/code/start/Examples.codeblock.dispose.cs
6471
:language: csharp
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
var newKey = await user.ApiKeys.CreateAsync("someKeyName");
2-
Console.WriteLine($"I created a key named {newKey.Name}. " +
3-
$"Is it enabled? {newKey.IsEnabled}");
2+
Console.WriteLine($"I created a key named {newKey.Name}. " +
3+
$"Is it enabled? {newKey.IsEnabled}");
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
var allKeys = await user.ApiKeys.FetchAllAsync();
22
foreach (var key in allKeys)
33
{
4-
Console.WriteLine($"I fetched the key named {key.Name}. " +
4+
Console.WriteLine($"I fetched the key named {key.Name}. " +
55
$"Is it enabled? {key.IsEnabled}");
66
}
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
var key = await user.ApiKeys.FetchAsync(ObjectId.Parse("00112233445566778899aabb"));
2-
Console.WriteLine($"I fetched the key named {key.Name}. " +
3-
$"Is it enabled? {key.IsEnabled}");
2+
Console.WriteLine($"I fetched the key named {key.Name}. " +
3+
$"Is it enabled? {key.IsEnabled}");
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
await app.EmailPasswordAuth.CallResetPasswordFunctionAsync(
22
userEmail, myNewPassword,
33
"<security-question-1-answer>",
4-
"<security-question-2-answer>");
4+
"<security-question-2-answer>");

source/examples/generated/code/start/WorkWithRealm.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,19 +50,19 @@ publ async System.Threading.Tasks.Task APIKeys()
5050
{
5151

5252
var newKey = await user.ApiKeys.CreateAsync("someKeyName");
53-
Console.WriteLine($"I created a key named {newKey.Name}. " +
53+
Console.WriteLine($"I created a key named {newKey.Name}. " +
5454
$"Is it enabled? {newKey.IsEnabled}");
5555

5656

5757
var key = await user.ApiKeys.FetchAsync(ObjectId.Parse("00112233445566778899aabb"));
58-
Console.WriteLine($"I fetched the key named {key.Name}. " +
58+
Console.WriteLine($"I fetched the key named {key.Name}. " +
5959
$"Is it enabled? {key.IsEnabled}");
6060

6161

6262
var allKeys = await user.ApiKeys.FetchAllAsync();
6363
foreach (var key in allKeys)
6464
{
65-
Console.WriteLine($"I fetched the key named {key.Name}. " +
65+
Console.WriteLine($"I fetched the key named {key.Name}. " +
6666
$"Is it enabled? {key.IsEnabled}");
6767
}
6868

source/includes/dotnet-initialize-realm.rst

Lines changed: 0 additions & 54 deletions
This file was deleted.

0 commit comments

Comments
 (0)