mirror of
https://github.com/JustArchiNET/ArchiSteamFarm.git
synced 2025-12-24 02:06:47 +00:00
Compare commits
17 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d947fecbd1 | ||
|
|
75ca05830a | ||
|
|
3910f27a12 | ||
|
|
ce9d29401e | ||
|
|
40f677b859 | ||
|
|
a4c0ed4304 | ||
|
|
6c5e6911d5 | ||
|
|
799efdbb4b | ||
|
|
02134ab01f | ||
|
|
8e0be4dd54 | ||
|
|
ed91a03437 | ||
|
|
124994aead | ||
|
|
39a2991b47 | ||
|
|
c07bed7df1 | ||
|
|
9c405ed667 | ||
|
|
1db1757654 | ||
|
|
922a3c574d |
@@ -31,18 +31,19 @@ csharp_preserve_single_line_statements = false
|
||||
|
||||
csharp_space_after_cast = true
|
||||
|
||||
csharp_style_expression_bodied_accessors = when_on_single_line:suggestion
|
||||
csharp_style_expression_bodied_constructors = when_on_single_line:suggestion
|
||||
csharp_style_expression_bodied_indexers = when_on_single_line:suggestion
|
||||
csharp_style_expression_bodied_methods = when_on_single_line:suggestion
|
||||
csharp_style_expression_bodied_operators = when_on_single_line:suggestion
|
||||
csharp_style_expression_bodied_properties = when_on_single_line:suggestion
|
||||
csharp_style_pattern_matching_over_as_with_null_check = false:suggestion
|
||||
csharp_style_expression_bodied_accessors = true:suggestion
|
||||
csharp_style_expression_bodied_constructors = true:suggestion
|
||||
csharp_style_expression_bodied_indexers = true:suggestion
|
||||
csharp_style_expression_bodied_methods = true:suggestion
|
||||
csharp_style_expression_bodied_operators = true:suggestion
|
||||
csharp_style_expression_bodied_properties = true:suggestion
|
||||
|
||||
csharp_style_var_elsewhere = false:suggestion
|
||||
csharp_style_var_for_built_in_types = false:suggestion
|
||||
csharp_style_var_when_type_is_apparent = false:suggestion
|
||||
|
||||
csharp_using_directive_placement = outside_namespace:suggestion
|
||||
|
||||
[*.{cs,vb}]
|
||||
# PascalCase for naming everything but parameters
|
||||
dotnet_naming_rule.all_members_must_be_capitalized.severity = suggestion
|
||||
|
||||
5
.github/FUNDING.yml
vendored
Normal file
5
.github/FUNDING.yml
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: JustArchi
|
||||
patreon: JustArchi
|
||||
custom: https://www.paypal.me/JustArchi/5eur
|
||||
@@ -85,5 +85,5 @@ matrix:
|
||||
dist: xenial
|
||||
- os: osx
|
||||
# Ref: https://docs.travis-ci.com/user/reference/osx
|
||||
dotnet: 2.2.203 # For OSX, we need absolute dotnet version until https://github.com/dotnet/core-setup/issues/4187 is resolved
|
||||
dotnet: 2.2.300 # For OSX, we need absolute dotnet version until https://github.com/dotnet/core-setup/issues/4187 is resolved
|
||||
osx_image: xcode10.2
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<PackageReference Include="ConfigureAwaitChecker.Analyzer" Version="3.0.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.0" />
|
||||
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.1.1" />
|
||||
<PackageReference Include="MSTest.TestAdapter" Version="1.4.0" />
|
||||
<PackageReference Include="MSTest.TestFramework" Version="1.4.0" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>ASF.ico</ApplicationIcon>
|
||||
<AssemblyVersion>4.0.2.1</AssemblyVersion>
|
||||
<AssemblyVersion>4.0.2.2</AssemblyVersion>
|
||||
<Authors>JustArchi</Authors>
|
||||
<Company>JustArchi</Company>
|
||||
<ConcurrentGarbageCollection>true</ConcurrentGarbageCollection>
|
||||
@@ -11,7 +11,7 @@
|
||||
<DefaultItemExcludes>$(DefaultItemExcludes);config/**;debug/**;out/**;overlay/**</DefaultItemExcludes>
|
||||
<Description>ASF is an application that allows you to farm steam cards using multiple steam accounts simultaneously.</Description>
|
||||
<ErrorReport>none</ErrorReport>
|
||||
<FileVersion>4.0.2.1</FileVersion>
|
||||
<FileVersion>4.0.2.2</FileVersion>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
<LangVersion>latest</LangVersion>
|
||||
<NoWarn>1591</NoWarn>
|
||||
@@ -59,7 +59,7 @@
|
||||
<PackageReference Include="ConfigureAwaitChecker.Analyzer" Version="3.0.0">
|
||||
<PrivateAssets>all</PrivateAssets>
|
||||
</PackageReference>
|
||||
<PackageReference Include="HtmlAgilityPack" Version="1.11.4" />
|
||||
<PackageReference Include="HtmlAgilityPack" Version="1.11.7" />
|
||||
<PackageReference Include="Humanizer" Version="2.6.2" />
|
||||
<PackageReference Include="JetBrains.Annotations" Version="2019.1.1" />
|
||||
<PackageReference Include="Markdig.Signed" Version="0.17.0" />
|
||||
|
||||
52
ArchiSteamFarm/Collections/ConcurrentEnumerator.cs
Normal file
52
ArchiSteamFarm/Collections/ConcurrentEnumerator.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
// _ _ _ ____ _ _____
|
||||
// / \ _ __ ___ | |__ (_)/ ___| | |_ ___ __ _ _ __ ___ | ___|__ _ _ __ _ __ ___
|
||||
// / _ \ | '__|/ __|| '_ \ | |\___ \ | __|/ _ \ / _` || '_ ` _ \ | |_ / _` || '__|| '_ ` _ \
|
||||
// / ___ \ | | | (__ | | | || | ___) || |_| __/| (_| || | | | | || _|| (_| || | | | | | | |
|
||||
// /_/ \_\|_| \___||_| |_||_||____/ \__|\___| \__,_||_| |_| |_||_| \__,_||_| |_| |_| |_|
|
||||
// |
|
||||
// Copyright 2015-2019 Ł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.
|
||||
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using JetBrains.Annotations;
|
||||
|
||||
namespace ArchiSteamFarm.Collections {
|
||||
internal sealed class ConcurrentEnumerator<T> : IEnumerator<T> {
|
||||
public T Current => Enumerator.Current;
|
||||
|
||||
private readonly IEnumerator<T> Enumerator;
|
||||
private readonly SemaphoreSlim Semaphore;
|
||||
|
||||
object IEnumerator.Current => Current;
|
||||
|
||||
internal ConcurrentEnumerator([NotNull] IReadOnlyCollection<T> collection, [NotNull] SemaphoreSlim semaphore) {
|
||||
if ((collection == null) || (semaphore == null)) {
|
||||
throw new ArgumentNullException(nameof(collection) + " || " + nameof(semaphore));
|
||||
}
|
||||
|
||||
Semaphore = semaphore;
|
||||
semaphore.Wait();
|
||||
|
||||
Enumerator = collection.GetEnumerator();
|
||||
}
|
||||
|
||||
public void Dispose() => Semaphore.Release();
|
||||
public bool MoveNext() => Enumerator.MoveNext();
|
||||
public void Reset() => Enumerator.Reset();
|
||||
}
|
||||
}
|
||||
@@ -97,7 +97,7 @@ namespace ArchiSteamFarm.Collections {
|
||||
}
|
||||
}
|
||||
|
||||
public IEnumerator<T> GetEnumerator() => new ConcurrentEnumerator(BackingCollection, CollectionSemaphore);
|
||||
public IEnumerator<T> GetEnumerator() => new ConcurrentEnumerator<T>(BackingCollection, CollectionSemaphore);
|
||||
|
||||
public void IntersectWith(IEnumerable<T> other) {
|
||||
CollectionSemaphore.Wait();
|
||||
@@ -217,29 +217,5 @@ namespace ArchiSteamFarm.Collections {
|
||||
CollectionSemaphore.Release();
|
||||
}
|
||||
}
|
||||
|
||||
private sealed class ConcurrentEnumerator : IEnumerator<T> {
|
||||
public T Current => Enumerator.Current;
|
||||
|
||||
private readonly IEnumerator<T> Enumerator;
|
||||
private readonly SemaphoreSlim Semaphore;
|
||||
|
||||
object IEnumerator.Current => Current;
|
||||
|
||||
internal ConcurrentEnumerator([NotNull] IReadOnlyCollection<T> collection, [NotNull] SemaphoreSlim semaphore) {
|
||||
if ((collection == null) || (semaphore == null)) {
|
||||
throw new ArgumentNullException(nameof(collection) + " || " + nameof(semaphore));
|
||||
}
|
||||
|
||||
Semaphore = semaphore;
|
||||
semaphore.Wait();
|
||||
|
||||
Enumerator = collection.GetEnumerator();
|
||||
}
|
||||
|
||||
public void Dispose() => Semaphore.Release();
|
||||
public bool MoveNext() => Enumerator.MoveNext();
|
||||
public void Reset() => Enumerator.Reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -160,7 +160,7 @@ StackTrace:
|
||||
<comment>{0} will be replaced by object's name</comment>
|
||||
</data>
|
||||
<data name="ErrorMobileAuthenticatorInvalidDeviceID" xml:space="preserve">
|
||||
<value>Recusando executar esta função devido ao DeviceID inválido no ASF 2FA!</value>
|
||||
<value>Recusando a execução desta função devido a um DeviceID inválido no ASF 2FA!</value>
|
||||
</data>
|
||||
<data name="ErrorNoBotsDefined" xml:space="preserve">
|
||||
<value>Nenhum bot definido. Você se esqueceu de configurar seu ASF?</value>
|
||||
@@ -187,7 +187,7 @@ StackTrace:
|
||||
<value>Não foi possível prosseguir com a atualização pois esta versão não inclui nenhum arquivo!</value>
|
||||
</data>
|
||||
<data name="ErrorUserInputRunningInHeadlessMode" xml:space="preserve">
|
||||
<value>O pedido de entrada do usuário foi recebido, mas o processo está sendo executado no modo não-interativo!</value>
|
||||
<value>Recebemos um pedido de entrada do usuário, mas o processo está sendo executado no modo não-interativo!</value>
|
||||
</data>
|
||||
<data name="Exiting" xml:space="preserve">
|
||||
<value>Saindo...</value>
|
||||
@@ -443,7 +443,7 @@ StackTrace:
|
||||
<value>Este bot não será iniciado pois está desativado no arquivo de configurações!</value>
|
||||
</data>
|
||||
<data name="BotInvalidAuthenticatorDuringLogin" xml:space="preserve">
|
||||
<value>Erro TwoFactorCodeMismatch recebido {0} vezes seguidas. Suas credencias 2FA não são válidas ou seu relógio está fora de sincronia. Abortando!</value>
|
||||
<value>Recebemos o código de erro TwoFactorCodeMismatch {0} vezes seguidas. As suas credencias da autenticação em duas etapas são inválidas ou o relógio do sistema não está sincronizado. Abortando!</value>
|
||||
<comment>{0} will be replaced by maximum allowed number of failed 2FA attempts</comment>
|
||||
</data>
|
||||
<data name="BotLoggedOff" xml:space="preserve">
|
||||
@@ -473,7 +473,7 @@ StackTrace:
|
||||
<value>Você não pode enviar uma proposta de troca a si mesmo!</value>
|
||||
</data>
|
||||
<data name="BotNoASFAuthenticator" xml:space="preserve">
|
||||
<value>Este bot não possui o ASF 2FA habilitado! Você esqueceu de importar seu autenticador para o 2FA ASF?</value>
|
||||
<value>Este bot não possui o ASF 2FA habilitado! Você se esqueceu de importar o autenticador como ASF 2FA?</value>
|
||||
</data>
|
||||
<data name="BotNotConnected" xml:space="preserve">
|
||||
<value>Esse bot não está conectado!</value>
|
||||
@@ -661,22 +661,22 @@ StackTrace:
|
||||
<comment>{0} will be replaced by bot's level</comment>
|
||||
</data>
|
||||
<data name="ActivelyMatchingItems" xml:space="preserve">
|
||||
<value>Correspondendo itens Steam, rodada #{0}...</value>
|
||||
<value>Associando itens do Steam, {0}ª rodada...</value>
|
||||
<comment>{0} will be replaced by round number</comment>
|
||||
</data>
|
||||
<data name="DoneActivelyMatchingItems" xml:space="preserve">
|
||||
<value>Itens Steam correspondidos, rodada #{0}.</value>
|
||||
<value>Associação de itens do Steam concluída, {0}ª rodada.</value>
|
||||
<comment>{0} will be replaced by round number</comment>
|
||||
</data>
|
||||
<data name="ErrorAborted" xml:space="preserve">
|
||||
<value>Cancelado!</value>
|
||||
</data>
|
||||
<data name="ActivelyMatchingItemsRound" xml:space="preserve">
|
||||
<value>Correspondido um total de {0} conjuntos nessa rodada.</value>
|
||||
<value>{0} conjuntos foram associados no total nessa rodada.</value>
|
||||
<comment>{0} will be replaced by number of sets traded</comment>
|
||||
</data>
|
||||
<data name="WarningExcessiveBotsCount" xml:space="preserve">
|
||||
<value>Você está rodando mais contas de bots pessoais do que nosso limite máximo recomendado ({0}). Esteja ciente de que essa configuração não é suportada e pode causar vários problemas relacionados ao Steam, incluindo suspensões de contas. Confira o FAQ para mais detalhes.</value>
|
||||
<value>Você está rodando mais contas pessoais de bots do que nosso limite máximo recomendado ({0}). Esteja ciente de que essa configuração não é suportada e pode causar vários problemas relacionados ao Steam, incluindo suspensões de contas. Acesse as perguntas frequentes para mais detalhes.</value>
|
||||
<comment>{0} will be replaced by our maximum recommended bots count (number)</comment>
|
||||
</data>
|
||||
<data name="PluginLoaded" xml:space="preserve">
|
||||
@@ -729,6 +729,6 @@ StackTrace:
|
||||
<comment>{0} will be replaced by translated TimeSpan string (such as "1 minute")</comment>
|
||||
</data>
|
||||
<data name="UpdateCleanup" xml:space="preserve">
|
||||
<value>Apagando arquivos antigos após a atualização...</value>
|
||||
<value>Limpando arquivos antigos após a atualização...</value>
|
||||
</data>
|
||||
</root>
|
||||
|
||||
@@ -37,10 +37,16 @@ namespace ArchiSteamFarm {
|
||||
|
||||
private static Mutex SingleInstance;
|
||||
|
||||
internal static void CoreInit() {
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) {
|
||||
Console.OutputEncoding = Encoding.Unicode;
|
||||
|
||||
DisableQuickEditMode();
|
||||
}
|
||||
}
|
||||
|
||||
internal static void Init(bool systemRequired, GlobalConfig.EOptimizationMode optimizationMode) {
|
||||
if (RuntimeInformation.IsOSPlatform(OSPlatform.Windows)) {
|
||||
DisableQuickEditMode();
|
||||
|
||||
if (systemRequired) {
|
||||
KeepWindowsSystemActive();
|
||||
}
|
||||
|
||||
@@ -129,7 +129,7 @@ namespace ArchiSteamFarm {
|
||||
}
|
||||
|
||||
private static async Task InitASF(IReadOnlyCollection<string> args) {
|
||||
Console.OutputEncoding = Encoding.Unicode;
|
||||
OS.CoreInit();
|
||||
|
||||
string programIdentifier = SharedInfo.PublicIdentifier + " V" + SharedInfo.Version + " (" + SharedInfo.BuildInfo.Variant + "/" + SharedInfo.ModuleVersion + " | " + OS.Variant + ")";
|
||||
|
||||
|
||||
File diff suppressed because one or more lines are too long
@@ -59,6 +59,14 @@ before_build:
|
||||
dotnet --info
|
||||
|
||||
|
||||
if ($LastExitCode -ne 0) {
|
||||
throw "Last command failed."
|
||||
}
|
||||
|
||||
|
||||
java -version
|
||||
|
||||
|
||||
if ($LastExitCode -ne 0) {
|
||||
throw "Last command failed."
|
||||
}
|
||||
|
||||
2
wiki
2
wiki
Submodule wiki updated: 82e82c1a14...b65ec70ac9
Reference in New Issue
Block a user