Skip to content

Commit

Permalink
Fix docs build
Browse files Browse the repository at this point in the history
  • Loading branch information
nirinchev committed Feb 5, 2024
1 parent f1b79c5 commit a653b24
Show file tree
Hide file tree
Showing 11 changed files with 27 additions and 28 deletions.
8 changes: 3 additions & 5 deletions .github/templates/build-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,19 @@
uses: #@ actionCache
with:
path: 'C:\docfx'
key: docfx-2.70.4
key: docfx-2.75.2
- name: Download docfx
if: inputs.build-docs && steps.check-docfx-cache.outputs.cache-hit != 'true'
run: |
Invoke-WebRequest -Uri https://github.com/dotnet/docfx/releases/download/v2.70.4/docfx-win-x64-v2.70.4.zip -OutFile C:\docfx.zip
Invoke-WebRequest -Uri https://github.com/dotnet/docfx/releases/download/v2.75.2/docfx-win-x64-v2.75.2.zip -OutFile C:\docfx.zip
Expand-Archive -Path C:\docfx.zip -DestinationPath C:\docfx
shell: powershell
- _: #@ template.replace(setupDotnet("6.0.402", ifCondition = "inputs.build-docs"))
- _: #@ template.replace(setupDotnet("7.0.x", ifCondition = "inputs.build-docs"))
- name: Build docs
if: inputs.build-docs
env:
DOCFX_SOURCE_BRANCH_NAME: ${{ github.head_ref }}
run: |
New-Item global.json
Set-Content global.json '{ "sdk": { "version": "6.0.402" } }'
C:\docfx\docfx Docs/docfx.json
#! the link generated by docfx is incorrect - it points to
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/build-packages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -219,25 +219,23 @@ jobs:
uses: nirinchev/cache@29e8e4dd9148ea81f9e188480132072cb6cc92d8
with:
path: C:\docfx
key: docfx-2.70.4
key: docfx-2.75.2
- name: Download docfx
if: inputs.build-docs && steps.check-docfx-cache.outputs.cache-hit != 'true'
run: |
Invoke-WebRequest -Uri https://github.com/dotnet/docfx/releases/download/v2.70.4/docfx-win-x64-v2.70.4.zip -OutFile C:\docfx.zip
Invoke-WebRequest -Uri https://github.com/dotnet/docfx/releases/download/v2.75.2/docfx-win-x64-v2.75.2.zip -OutFile C:\docfx.zip
Expand-Archive -Path C:\docfx.zip -DestinationPath C:\docfx
shell: powershell
- name: Configure .NET
uses: actions/setup-dotnet@607fce577a46308457984d59e4954e075820f10a
if: inputs.build-docs
with:
dotnet-version: 6.0.402
dotnet-version: 7.0.x
- name: Build docs
if: inputs.build-docs
env:
DOCFX_SOURCE_BRANCH_NAME: ${{ github.head_ref }}
run: |
New-Item global.json
Set-Content global.json '{ "sdk": { "version": "6.0.402" } }'
C:\docfx\docfx Docs/docfx.json
- name: Update Improve this doc links
run: |
Expand Down
2 changes: 1 addition & 1 deletion Docs/docfx.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"_appTitle": "Realm",
"_appFaviconPath": "images/favicon.ico",
"_appLogoPath": "images/logo.svg",
"_appFooter": "Copyright © 2020-2023 <a href=\"https://realm.io\">Realm</a><br>Generated by <strong>DocFX</strong>",
"_appFooter": "Copyright © 2020-2024 <a href=\"https://realm.io\">Realm</a><br>Generated by <strong>DocFX</strong>",
"_gitContribute": {
"repo": "https://github.com/realm/realm-dotnet.git",
"branch": "main",
Expand Down
7 changes: 5 additions & 2 deletions Realm/Realm/Attributes/BacklinkAttribute.cs
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,13 @@ namespace Realms
/// }
/// </code>
/// </example>
[AttributeUsage(AttributeTargets.Property, AllowMultiple = false)]
[AttributeUsage(AttributeTargets.Property)]
public sealed class BacklinkAttribute : Attribute
{
internal string Property { get; }
/// <summary>
/// Gets the property that is on the other end of the relationship.
/// </summary>
public string Property { get; }

/// <summary>
/// Initializes a new instance of the <see cref="BacklinkAttribute"/> class.
Expand Down
2 changes: 1 addition & 1 deletion Realm/Realm/DatabaseTypes/QueryArgument.cs
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,7 @@ private QueryArgument(RealmValue? realmValue = null, GeoShapeBase? geoValue = nu
public static implicit operator QueryArgument(RealmObjectBase? value) => new(value);

/// <summary>
/// Implicitly constructs a <see cref="QueryArgument"/> from <see cref="RealmValue" />.
/// Implicitly constructs a <see cref="QueryArgument"/> from <see cref="Realms.RealmValue" />.
/// </summary>
/// <param name="value">The value to store in the <see cref="QueryArgument"/>.</param>
/// <returns>A <see cref="QueryArgument"/> containing the supplied <paramref name="value"/>.</returns>
Expand Down
7 changes: 5 additions & 2 deletions Realm/Realm/Exceptions/RealmDecryptionFailedException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,19 @@
//
////////////////////////////////////////////////////////////////////////////

using Realms.Sync;

namespace Realms.Exceptions
{
/// <summary>
/// An exception, raised when file decryption is unsuccessful, most likely due to invalid
/// <see cref="RealmConfigurationBase.EncryptionKey"/>.
/// <see cref="RealmConfiguration.EncryptionKey"/>.
/// <see cref="SyncConfigurationBase.EncryptionKey"/>.
/// </summary>
public class RealmDecryptionFailedException : RealmFileAccessErrorException
{
internal RealmDecryptionFailedException(string message) : base(message)
{
}
}
}
}
13 changes: 5 additions & 8 deletions Realm/Realm/Extensions/CollectionExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ public static void Move<T>(this IList<T> list, int from, int to)
/// </summary>
/// <param name="dictionary">The <see cref="IDictionary{String, T}"/> to observe for changes.</param>
/// <typeparam name="T">Type of the elements in the dictionary.</typeparam>
/// <seealso cref="IRealmCollection{TValue}.SubscribeForNotifications"/>
/// <seealso cref="IRealmCollection{T}.SubscribeForNotifications"/>
/// <returns>The collection, implementing <see cref="INotifyCollectionChanged"/>.</returns>
public static IRealmCollection<KeyValuePair<string, T>> AsRealmCollection<T>(this IDictionary<string, T> dictionary)
{
Expand Down Expand Up @@ -310,7 +310,7 @@ public static IQueryable<T> AsRealmQueryable<T>(this IDictionary<string, T?> dic
/// </summary>
/// <param name="dictionary">The <see cref="IDictionary{String, T}"/> to observe for changes.</param>
/// <typeparam name="T">Type of the elements in the dictionary.</typeparam>
/// <seealso cref="IRealmCollection{TValue}.SubscribeForNotifications"/>
/// <seealso cref="IRealmCollection{T}.SubscribeForNotifications"/>
/// <param name="callback">The callback to be invoked with the updated <see cref="IRealmCollection{T}"/>.</param>
/// <returns>
/// A subscription token. It must be kept alive for as long as you want to receive change notifications.
Expand All @@ -326,7 +326,7 @@ public static IDisposable SubscribeForNotifications<T>(this IDictionary<string,
/// </summary>
/// <param name="dictionary">The <see cref="IDictionary{String, T}"/> to observe for changes.</param>
/// <typeparam name="T">Type of the elements in the dictionary.</typeparam>
/// <seealso cref="IRealmCollection{TValue}.SubscribeForNotifications"/>
/// <seealso cref="IRealmCollection{T}.SubscribeForNotifications"/>
/// <param name="callback">The callback to be invoked with the updated <see cref="IRealmCollection{T}"/>.</param>
/// <returns>
/// A subscription token. It must be kept alive for as long as you want to receive change notifications.
Expand Down Expand Up @@ -403,10 +403,7 @@ public static IQueryable<T> Filter<T>(this IQueryable<T> query, string predicate
/// joe.dogs.Filter("Name BEGINSWITH $0", "R");
/// </code>
/// </example>
/// <seealso href="https://docs.mongodb.com/realm/reference/realm-query-language/">
/// Examples of the NSPredicate syntax
/// </seealso>
/// <seealso href="https://academy.realm.io/posts/nspredicate-cheatsheet/">NSPredicate Cheatsheet</seealso>
/// <seealso href="https://docs.mongodb.com/realm/reference/realm-query-language/"/>
public static IQueryable<T> Filter<T>(this IList<T> list, string predicate, params QueryArgument[] arguments)
where T : IRealmObjectBase
{
Expand Down Expand Up @@ -612,4 +609,4 @@ private static void PopulateCollectionCore<T>(ICollection<T>? source, ICollectio
}
}
}
}
}
2 changes: 1 addition & 1 deletion Realm/Realm/Schema/ObjectSchema.cs
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ public Builder(Type type)
return this;
}

protected override string GetKey(Property item) => item.Name;
private protected override string GetKey(Property item) => item.Name;
}
}
}
2 changes: 1 addition & 1 deletion Realm/Realm/Schema/RealmSchema.cs
Original file line number Diff line number Diff line change
Expand Up @@ -355,7 +355,7 @@ public Builder Add(Type type)
return this;
}

protected override string GetKey(ObjectSchema item) => Argument.ValidateNotNull(item, nameof(item)).Name;
private protected override string GetKey(ObjectSchema item) => Argument.ValidateNotNull(item, nameof(item)).Name;
}
}
}
2 changes: 1 addition & 1 deletion Realm/Realm/Schema/SchemaBuilderBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ protected void Add(T item)
/// <returns><c>true</c> if the builder contains the specified item; <c>false</c> otherwise.</returns>
public bool Contains(string name) => _values.ContainsKey(name);

protected abstract string GetKey(T item);
private protected abstract string GetKey(T item);

/// <inheritdoc/>
public IEnumerator<T> GetEnumerator() => _values.Values.GetEnumerator();
Expand Down
2 changes: 1 addition & 1 deletion Realm/Realm/Sync/AppConfiguration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ public string BaseFilePath
/// Gets or sets the encryption key for user metadata on this device.
/// </summary>
/// <remarks>
/// This will not change the encryption key for individual Realms. This should still be set in <see cref="RealmConfigurationBase.EncryptionKey"/>
/// This will not change the encryption key for individual Realms. This should still be set in <see cref="SyncConfigurationBase.EncryptionKey"/>
/// when opening the <see cref="Realm"/>.
/// </remarks>
/// <value>The user metadata encryption key.</value>
Expand Down

0 comments on commit a653b24

Please sign in to comment.