Kill some TODOs

This commit is contained in:
JustArchi
2017-07-02 10:05:24 +02:00
parent d5b085864c
commit 6e138fd880
5 changed files with 1 additions and 98 deletions

View File

@@ -1476,15 +1476,6 @@ namespace ArchiSteamFarm.Localization {
}
}
/// <summary>
/// Wyszukuje zlokalizowany ciąg podobny do ciągu ASF detected unsupported runtime version, program might NOT run correctly in current environment. You&apos;re running it at your own risk without support!.
/// </summary>
internal static string WarningRuntimeUnsupported {
get {
return ResourceManager.GetString("WarningRuntimeUnsupported", resourceCulture);
}
}
/// <summary>
/// Wyszukuje zlokalizowany ciąg podobny do ciągu Playing more than {0} games concurrently is not possible, only first {0} entries from {1} will be used!.
/// </summary>

View File

@@ -230,9 +230,6 @@ StackTrace:
<data name="Restarting" xml:space="preserve">
<value>Restarting...</value>
</data>
<data name="WarningRuntimeUnsupported" xml:space="preserve">
<value>ASF detected unsupported runtime version, program might NOT run correctly in current environment. You're running it at your own risk without support!</value>
</data>
<data name="Starting" xml:space="preserve">
<value>Starting...</value>
</data>

View File

@@ -155,11 +155,6 @@ namespace ArchiSteamFarm {
await InitGlobalConfigAndLanguage().ConfigureAwait(false);
if (!Runtime.IsRuntimeSupported) {
ASF.ArchiLogger.LogGenericError(Strings.WarningRuntimeUnsupported);
await Task.Delay(60 * 1000).ConfigureAwait(false);
}
await InitGlobalDatabaseAndServices().ConfigureAwait(false);
// If debugging is on, we prepare debug directory prior to running

View File

@@ -1,30 +0,0 @@
/*
_ _ _ ____ _ _____
/ \ _ __ ___ | |__ (_)/ ___| | |_ ___ __ _ _ __ ___ | ___|__ _ _ __ _ __ ___
/ _ \ | '__|/ __|| '_ \ | |\___ \ | __|/ _ \ / _` || '_ ` _ \ | |_ / _` || '__|| '_ ` _ \
/ ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
/_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
Copyright 2015-2017 Łukasz "JustArchi" Domeradzki
Contact: JustArchi@JustArchi.net
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
namespace ArchiSteamFarm {
internal static class Runtime {
// TODO
internal static bool IsRuntimeSupported => true;
}
}

View File

@@ -29,7 +29,6 @@ using System.Globalization;
using System.Linq;
using System.Net;
using System.Runtime.CompilerServices;
using System.Text;
using Humanizer;
namespace ArchiSteamFarm {
@@ -70,23 +69,6 @@ namespace ArchiSteamFarm {
internal static uint GetUnixTime() => (uint) DateTimeOffset.UtcNow.ToUnixTimeSeconds();
/*
internal static int RandomNext(int maxWithout) {
if (maxWithout <= 0) {
ASF.ArchiLogger.LogNullError(nameof(maxWithout));
return -1;
}
if (maxWithout == 1) {
return 0;
}
lock (Random) {
return Random.Next(maxWithout);
}
}
*/
internal static bool IsValidHexadecimalString(string text) {
if (string.IsNullOrEmpty(text)) {
ASF.ArchiLogger.LogNullError(nameof(text));
@@ -115,39 +97,7 @@ namespace ArchiSteamFarm {
yield return item;
}
internal static string ToHumanReadable(this TimeSpan timeSpan) {
// TODO: Remove this awful hack once we get rid of ILRepack in .NET core, Humanize() should always work
try {
return timeSpan.Humanize(3);
} catch (ArgumentException) {
StringBuilder result = new StringBuilder();
if (timeSpan.Days > 0) {
result.Append(timeSpan.Days + " " + (timeSpan.Days > 1 ? "days" : "day") + ", ");
}
if (timeSpan.Hours > 0) {
result.Append(timeSpan.Hours + " " + (timeSpan.Hours > 1 ? "hours" : "hour") + ", ");
}
if (timeSpan.Minutes > 0) {
result.Append(timeSpan.Minutes + " " + (timeSpan.Minutes > 1 ? "minutes" : "minute") + ", ");
}
if (timeSpan.Seconds > 0) {
result.Append(timeSpan.Seconds + " " + (timeSpan.Seconds > 1 ? "seconds" : "second") + ", ");
}
if (result.Length == 0) {
return "0 seconds";
}
// Get rid of last comma + space
result.Length -= 2;
return result.ToString();
}
}
internal static string ToHumanReadable(this TimeSpan timeSpan) => timeSpan.Humanize(3);
private static string[] GetArgs(this string[] args, byte argsToSkip = 1) {
if (args.Length < argsToSkip) {