Implement basic code contracts

This commit is contained in:
JustArchi
2019-01-10 23:44:32 +01:00
parent 0f2a816b92
commit 192656cd02
43 changed files with 213 additions and 64 deletions

View File

@@ -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);