diff --git a/Directory.Build.targets b/Directory.Build.targets index 7b34002df..d169ca410 100644 --- a/Directory.Build.targets +++ b/Directory.Build.targets @@ -1,26 +1,24 @@  latest - 6.0.10 - 18.1.6 - 6.0.31101 - 17.4.0 + 6.0.31201 + 17.7.2 CS1591;REO00038;REO00039;REO00040;REO00042;REO00043;REO00044;REO00051;REO00059;REO00060;REO00065 - + - + - - + + - - + + diff --git a/VkNet/Categories/MessagesCategory.cs b/VkNet/Categories/MessagesCategory.cs index 9a493cb5c..f35f614de 100644 --- a/VkNet/Categories/MessagesCategory.cs +++ b/VkNet/Categories/MessagesCategory.cs @@ -740,7 +740,7 @@ public GetIntentUsersResult GetIntentUsers(MessagesGetIntentUsersParams getInten }); /// - [Obsolete(ObsoleteText.MessageDeleteDialog)] + [Obsolete(ObsoleteText.MessageDeleteDialog, true)] public ulong DeleteDialog(long? userId, long? peerId = null, uint? offset = null, uint? count = null) => DeleteConversation(userId, peerId); diff --git a/VkNet/Model/RequestParams/Market/MarketProductParams.cs b/VkNet/Model/RequestParams/Market/MarketProductParams.cs index 613bf1eb7..44265d41f 100644 --- a/VkNet/Model/RequestParams/Market/MarketProductParams.cs +++ b/VkNet/Model/RequestParams/Market/MarketProductParams.cs @@ -1,4 +1,4 @@ -using System; +using System; using System.Collections.Generic; using Newtonsoft.Json; using VkNet.Abstractions; @@ -120,7 +120,7 @@ public class MarketProductParams /// а набор свойств должен быть уникален для каждого товара. /// [JsonProperty("variant_ids")] - public IEnumerable VariantIds { get; set} + public IEnumerable VariantIds { get; set; } /// /// Признак, является ли товар главным в своей группе. diff --git a/VkNet/Utils/CountByIntervalAwaitableConstraint.cs b/VkNet/Utils/CountByIntervalAwaitableConstraint.cs index cfd6712a5..99166069b 100644 --- a/VkNet/Utils/CountByIntervalAwaitableConstraint.cs +++ b/VkNet/Utils/CountByIntervalAwaitableConstraint.cs @@ -68,10 +68,10 @@ public async Task WaitForReadinessAsync(CancellationToken cancellat await _semaphore.WaitAsync(cancellationToken) .ConfigureAwait(false); - if (DateTime.Now - _dateTime >= _timeSpan) + if (DateTime.UtcNow - _dateTime >= _timeSpan) { _left = _count; - _dateTime = DateTime.Now; + _dateTime = DateTime.UtcNow; } if (_left > 0) @@ -79,7 +79,7 @@ await _semaphore.WaitAsync(cancellationToken) _left--; } else { - var timeToWait = (int) Math.Ceiling((_timeSpan - (DateTime.Now - _dateTime)).TotalMilliseconds + 15); + var timeToWait = (int) Math.Ceiling((_timeSpan - (DateTime.UtcNow - _dateTime)).TotalMilliseconds + 15); try { @@ -88,6 +88,7 @@ await Task.Delay(timeToWait, cancellationToken) } catch { + // ignored } _left = _count - 1; diff --git a/VkNet/VkNet.csproj b/VkNet/VkNet.csproj index 80e7c54c1..c508ff2d2 100644 --- a/VkNet/VkNet.csproj +++ b/VkNet/VkNet.csproj @@ -56,6 +56,10 @@ + + all + runtime; build; native; contentfiles; analyzers; buildtransitive +