mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2026-01-01 14:10:53 +00:00
Implement basic code contracts
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ConfigureAwaitChecker.Analyzer" Version="2.0.0" />
|
||||
<PackageReference Include="JetBrains.Annotations" Version="2018.2.1" />
|
||||
<PackageReference Include="SteamKit2" Version="2.1.0" />
|
||||
<PackageReference Include="System.Composition.AttributedModel" Version="1.3.0-preview.18571.3" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -22,6 +22,7 @@
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Threading.Tasks;
|
||||
using JetBrains.Annotations;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace ArchiSteamFarm.CustomPlugins.ExamplePlugin {
|
||||
@@ -31,7 +32,8 @@ namespace ArchiSteamFarm.CustomPlugins.ExamplePlugin {
|
||||
internal static class CatAPI {
|
||||
private const string URL = "https://aws.random.cat";
|
||||
|
||||
internal static async Task<string> GetRandomCatURL(WebBrowser webBrowser) {
|
||||
[ItemCanBeNull]
|
||||
internal static async Task<string> GetRandomCatURL([NotNull] WebBrowser webBrowser) {
|
||||
const string request = URL + "/meow";
|
||||
|
||||
WebBrowser.ObjectResponse<MeowResponse> response = await webBrowser.UrlGetToJsonObject<MeowResponse>(request).ConfigureAwait(false);
|
||||
|
||||
Reference in New Issue
Block a user