diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 143523f..b3b131e 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -47,7 +47,7 @@ - + diff --git a/src/ReactiveMarbles.CacheData.SystemTextJson/ReactiveMarbles.CacheDatabase.SystemTextJson.csproj b/src/ReactiveMarbles.CacheData.SystemTextJson/ReactiveMarbles.CacheDatabase.SystemTextJson.csproj index a0b04e9..e2be408 100644 --- a/src/ReactiveMarbles.CacheData.SystemTextJson/ReactiveMarbles.CacheDatabase.SystemTextJson.csproj +++ b/src/ReactiveMarbles.CacheData.SystemTextJson/ReactiveMarbles.CacheDatabase.SystemTextJson.csproj @@ -11,7 +11,7 @@ - + diff --git a/src/ReactiveMarbles.CacheDatabase.Benchmarks/ReactiveMarbles.CacheDatabase.Benchmarks.csproj b/src/ReactiveMarbles.CacheDatabase.Benchmarks/ReactiveMarbles.CacheDatabase.Benchmarks.csproj index 3562e90..f3cc511 100644 --- a/src/ReactiveMarbles.CacheDatabase.Benchmarks/ReactiveMarbles.CacheDatabase.Benchmarks.csproj +++ b/src/ReactiveMarbles.CacheDatabase.Benchmarks/ReactiveMarbles.CacheDatabase.Benchmarks.csproj @@ -2,12 +2,12 @@ Exe - net5.0 + net6.0 false - + diff --git a/src/ReactiveMarbles.CacheDatabase.Core/HttpService.cs b/src/ReactiveMarbles.CacheDatabase.Core/HttpService.cs index 615ad8d..a091bab 100644 --- a/src/ReactiveMarbles.CacheDatabase.Core/HttpService.cs +++ b/src/ReactiveMarbles.CacheDatabase.Core/HttpService.cs @@ -48,7 +48,7 @@ public HttpService() /// Force a web request to always be issued, skipping the cache. /// An optional expiration date. /// The data downloaded from the URL. - public IObservable DownloadUrl(IBlobCache blobCache!!, string url, HttpMethod? method = default, IEnumerable>? headers = null, bool fetchAlways = false, DateTimeOffset? absoluteExpiration = null) => + public IObservable DownloadUrl(IBlobCache blobCache, string url, HttpMethod? method = default, IEnumerable>? headers = null, bool fetchAlways = false, DateTimeOffset? absoluteExpiration = null) => blobCache.DownloadUrl(url, url, method, headers, fetchAlways, absoluteExpiration); /// @@ -64,7 +64,7 @@ public IObservable DownloadUrl(IBlobCache blobCache!!, string url, HttpM /// Force a web request to always be issued, skipping the cache. /// An optional expiration date. /// The data downloaded from the URL. - public IObservable DownloadUrl(IBlobCache blobCache!!, Uri url, HttpMethod? method = default, IEnumerable>? headers = null, bool fetchAlways = false, DateTimeOffset? absoluteExpiration = null) => url is null + public IObservable DownloadUrl(IBlobCache blobCache, Uri url, HttpMethod? method = default, IEnumerable>? headers = null, bool fetchAlways = false, DateTimeOffset? absoluteExpiration = null) => url is null ? throw new ArgumentNullException(nameof(url)) : blobCache.DownloadUrl(url.ToString(), url, method, headers, fetchAlways, absoluteExpiration); diff --git a/src/ReactiveMarbles.CacheDatabase.Core/SerializerExtensions.cs b/src/ReactiveMarbles.CacheDatabase.Core/SerializerExtensions.cs index 38de2f4..9fe3c4e 100644 --- a/src/ReactiveMarbles.CacheDatabase.Core/SerializerExtensions.cs +++ b/src/ReactiveMarbles.CacheDatabase.Core/SerializerExtensions.cs @@ -28,7 +28,7 @@ public static class SerializerExtensions /// The key/value to insert. /// An optional expiration date. /// A observable which signals when complete. - public static IObservable InsertObjects(this IBlobCache blobCache, IEnumerable> keyValuePairs!!, DateTimeOffset? absoluteExpiration = null) + public static IObservable InsertObjects(this IBlobCache blobCache, IEnumerable> keyValuePairs, DateTimeOffset? absoluteExpiration = null) { if (blobCache is null) { @@ -47,7 +47,7 @@ public static IObservable InsertObjects(this IBlobCache blobCache, IEnu /// The blob cache. /// The keys to get the values for. /// A observable with the specified values. - public static IObservable> GetObjects(this IBlobCache blobCache, IEnumerable keys!!) + public static IObservable> GetObjects(this IBlobCache blobCache, IEnumerable keys) { if (blobCache is null) { @@ -114,7 +114,7 @@ public static IObservable InsertObject(this IBlobCache blobCache, strin /// The blob cache. /// A Future result representing all objects in the cache /// with the specified Type. - public static IObservable GetAllObjects(this IBlobCache blobCache!!) => + public static IObservable GetAllObjects(this IBlobCache blobCache) => blobCache is null ? throw new ArgumentNullException(nameof(blobCache)) : blobCache @@ -219,7 +219,7 @@ blobCache is null /// The type of item to get. /// A Future result representing the deserialized object from /// the cache. - public static IObservable GetOrFetchObject(this IBlobCache blobCache!!, string key, Func> fetchFunc, DateTimeOffset? absoluteExpiration = null) => + public static IObservable GetOrFetchObject(this IBlobCache blobCache, string key, Func> fetchFunc, DateTimeOffset? absoluteExpiration = null) => blobCache.GetObject(key).Catch(_ => fetchFunc()); /// @@ -242,7 +242,7 @@ blobCache is null /// An optional expiration date. /// A Future result representing the deserialized object from /// the cache. - public static IObservable GetOrFetchObject(this IBlobCache blobCache!!, string key, Func> fetchFunc, DateTimeOffset? absoluteExpiration = null) => + public static IObservable GetOrFetchObject(this IBlobCache blobCache, string key, Func> fetchFunc, DateTimeOffset? absoluteExpiration = null) => blobCache.GetOrFetchObject(key, () => fetchFunc().ToObservable(), absoluteExpiration); /// @@ -309,7 +309,7 @@ blobCache is null /// An Observable stream containing either one or two /// results (possibly a cached version, then the latest version). public static IObservable GetAndFetchLatest( - this IBlobCache blobCache!!, + this IBlobCache blobCache, string key, Func> fetchFunc, Func? fetchPredicate = null, @@ -392,7 +392,7 @@ blobCache is null /// An Observable stream containing either one or two /// results (possibly a cached version, then the latest version). public static IObservable GetAndFetchLatest( - this IBlobCache blobCache!!, + this IBlobCache blobCache, string key, Func> fetchFunc, Func? fetchPredicate = null, diff --git a/src/ReactiveMarbles.CacheDatabase.EncryptedSettings.Tests/ReactiveMarbles.CacheDatabase.EncryptedSettings.Tests.csproj b/src/ReactiveMarbles.CacheDatabase.EncryptedSettings.Tests/ReactiveMarbles.CacheDatabase.EncryptedSettings.Tests.csproj index bb9d292..132806a 100644 --- a/src/ReactiveMarbles.CacheDatabase.EncryptedSettings.Tests/ReactiveMarbles.CacheDatabase.EncryptedSettings.Tests.csproj +++ b/src/ReactiveMarbles.CacheDatabase.EncryptedSettings.Tests/ReactiveMarbles.CacheDatabase.EncryptedSettings.Tests.csproj @@ -13,9 +13,10 @@ - - - + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/ReactiveMarbles.CacheDatabase.EncryptedSqlite3/ReactiveMarbles.CacheDatabase.EncryptedSqlite3.csproj b/src/ReactiveMarbles.CacheDatabase.EncryptedSqlite3/ReactiveMarbles.CacheDatabase.EncryptedSqlite3.csproj index 172490b..0f3039e 100644 --- a/src/ReactiveMarbles.CacheDatabase.EncryptedSqlite3/ReactiveMarbles.CacheDatabase.EncryptedSqlite3.csproj +++ b/src/ReactiveMarbles.CacheDatabase.EncryptedSqlite3/ReactiveMarbles.CacheDatabase.EncryptedSqlite3.csproj @@ -1,7 +1,7 @@ - + - netstandard2.0;net6.0 + netstandard2.0;net6.0;net48 enable preview $(DefineConstants);ENCRYPTED @@ -9,6 +9,7 @@ + diff --git a/src/ReactiveMarbles.CacheDatabase.Settings.Tests/ReactiveMarbles.CacheDatabase.Settings.Tests.csproj b/src/ReactiveMarbles.CacheDatabase.Settings.Tests/ReactiveMarbles.CacheDatabase.Settings.Tests.csproj index 7494143..4a5f82d 100644 --- a/src/ReactiveMarbles.CacheDatabase.Settings.Tests/ReactiveMarbles.CacheDatabase.Settings.Tests.csproj +++ b/src/ReactiveMarbles.CacheDatabase.Settings.Tests/ReactiveMarbles.CacheDatabase.Settings.Tests.csproj @@ -1,4 +1,4 @@ - + net6.0 @@ -8,9 +8,10 @@ - - - + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all diff --git a/src/ReactiveMarbles.CacheDatabase.Settings/Core/SettingsStorage.cs b/src/ReactiveMarbles.CacheDatabase.Settings/Core/SettingsStorage.cs index f40d68a..e629395 100644 --- a/src/ReactiveMarbles.CacheDatabase.Settings/Core/SettingsStorage.cs +++ b/src/ReactiveMarbles.CacheDatabase.Settings/Core/SettingsStorage.cs @@ -32,7 +32,7 @@ public abstract class SettingsStorage : ISettingsStorage /// /// An implementation where you want your settings to be stored. /// - protected SettingsStorage(string keyPrefix, IBlobCache cache!!) + protected SettingsStorage(string keyPrefix, IBlobCache cache) { if (string.IsNullOrWhiteSpace(keyPrefix)) { diff --git a/src/ReactiveMarbles.CacheDatabase.Sqlite3/ReactiveMarbles.CacheDatabase.Sqlite3.csproj b/src/ReactiveMarbles.CacheDatabase.Sqlite3/ReactiveMarbles.CacheDatabase.Sqlite3.csproj index ab44364..991377a 100644 --- a/src/ReactiveMarbles.CacheDatabase.Sqlite3/ReactiveMarbles.CacheDatabase.Sqlite3.csproj +++ b/src/ReactiveMarbles.CacheDatabase.Sqlite3/ReactiveMarbles.CacheDatabase.Sqlite3.csproj @@ -1,13 +1,14 @@  - netstandard2.0;net6.0 + netstandard2.0;net6.0;net48 enable preview + diff --git a/src/ReactiveMarbles.CacheDatabase.Tests/ReactiveMarbles.CacheDatabase.Tests.csproj b/src/ReactiveMarbles.CacheDatabase.Tests/ReactiveMarbles.CacheDatabase.Tests.csproj index 93daec4..9f52f6d 100644 --- a/src/ReactiveMarbles.CacheDatabase.Tests/ReactiveMarbles.CacheDatabase.Tests.csproj +++ b/src/ReactiveMarbles.CacheDatabase.Tests/ReactiveMarbles.CacheDatabase.Tests.csproj @@ -1,14 +1,17 @@  - net6.0 + net6.0 preview false + win-x64 - - + + + + runtime; build; native; contentfiles; analyzers; buildtransitive all