Code cleanup

This commit is contained in:
JustArchi
2017-11-16 22:13:34 +01:00
parent 8019cdcbb4
commit 15d3f48751
2 changed files with 15 additions and 14 deletions

View File

@@ -163,6 +163,10 @@ namespace ArchiSteamFarm {
Task.Factory.StartNew(function, options).Forget();
}
internal static IEnumerable<T> ToEnumerable<T>(this T item) {
yield return item;
}
internal static string ToHumanReadable(this TimeSpan timeSpan) => timeSpan.Humanize(3, maxUnit: TimeUnit.Year);
private static string[] GetArgs(string[] args, byte argsToSkip = 1) {
@@ -181,10 +185,6 @@ namespace ArchiSteamFarm {
return result;
}
internal static IEnumerable<T> ToEnumerable<T>(this T item) {
yield return item;
}
private sealed class ReadOnlyCollectionAdapter<T> : IReadOnlyCollection<T> {
public int Count => Source.Count;

View File

@@ -1,11 +1,12 @@
<?xml version="1.0" encoding="UTF-8"?>
<linker>
<assembly fullname="System.Dynamic.Runtime">
<type fullname="System.Runtime.CompilerServices.CallSite`1" required="true" />
</assembly>
<?xml version="1.0" encoding="UTF-8"?>
<assembly fullname="System.Linq.Expressions">
<type fullname="System.Dynamic.DynamicObject" required="true" />
<type fullname="System.Runtime.CompilerServices.CallSiteOps" required="true" />
</assembly>
</linker>
<linker>
<assembly fullname="System.Dynamic.Runtime">
<type fullname="System.Runtime.CompilerServices.CallSite`1" required="true" />
</assembly>
<assembly fullname="System.Linq.Expressions">
<type fullname="System.Dynamic.DynamicObject" required="true" />
<type fullname="System.Runtime.CompilerServices.CallSiteOps" required="true" />
</assembly>
</linker>