Skip to content

Commit

Permalink
applied build props file using
Browse files Browse the repository at this point in the history
  • Loading branch information
lisa3907 committed May 26, 2022
1 parent bc6e4b7 commit 7d1eedc
Show file tree
Hide file tree
Showing 150 changed files with 1,415 additions and 1,401 deletions.
15 changes: 15 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<Project>
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>disable</Nullable>
<!--<WarningsAsErrors>CS8600;CS8602;CS8603</WarningsAsErrors>-->
<LangVersion>latest</LangVersion>
</PropertyGroup>

<!--<ItemGroup>
<PackageReference Include="SonarAnalyzer.CSharp" Version="8.38.0.46746">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
</ItemGroup>-->
</Project>
1 change: 1 addition & 0 deletions ccxt.net.sln
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution
appveyor.yml = appveyor.yml
CHANGELOG.md = CHANGELOG.md
CONTRIBUTING.md = CONTRIBUTING.md
Directory.Build.props = Directory.Build.props
global.json = global.json
LICENSE.txt = LICENSE.txt
README.md = README.md
Expand Down
2 changes: 1 addition & 1 deletion samples/binance/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ private static async Task Main(string[] args)
if (__step_no == 0 || __step_no == 1)
{
var _tickers = await _public_api.FetchTickersAsync();
if (_tickers.success == true)
if (_tickers.success)
{
var _btcusd_tickers = _tickers.result.Where(t => t.symbol.ToUpper().Contains("BTCUSD"));

Expand Down
1 change: 0 additions & 1 deletion samples/binance/binance.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 0 additions & 1 deletion samples/bitmex/bitmex.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion samples/bittrex/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ private static async Task Main(string[] args)
if (__step_no == 0 || __step_no == 1)
{
var _tickers = await _public_api.FetchTickersAsync();
if (_tickers.success == true)
if (_tickers.success)
{
var _btcusd_tickers = _tickers.result.Where(t => t.symbol.ToUpper().Contains("BTC"));

Expand Down
1 change: 0 additions & 1 deletion samples/bittrex/bittrex.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
1 change: 0 additions & 1 deletion samples/kraken/kraken.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
</PropertyGroup>

<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion src/Properties/PublishProfiles/FolderProfile.pubxml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ https://go.microsoft.com/fwlink/?LinkID=208121.
<Platform>Any CPU</Platform>
<PublishDir>D:\deploy\ccxt.net</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<TargetFramework>net6.0</TargetFramework>

<SelfContained>false</SelfContained>
</PropertyGroup>
</Project>
14 changes: 1 addition & 13 deletions src/ccxt.net.csproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Title>CryptoCurrency eXchange Trading Library for .NET</Title>
<Product>CCXT</Product>
<Company>ODINSOFT</Company>
Expand All @@ -18,29 +17,18 @@
<GenerateAssemblyCompanyAttribute>false</GenerateAssemblyCompanyAttribute>
<GenerateAssemblyProductAttribute>false</GenerateAssemblyProductAttribute>
<RootNamespace>CCXT.NET</RootNamespace>
<GeneratePackageOnBuild>true</GeneratePackageOnBuild>
<GeneratePackageOnBuild>false</GeneratePackageOnBuild>
<Version>1.4.13</Version>
<PackageReleaseNotes>RestSharp update and upgrade to .net core 6.</PackageReleaseNotes>
<AssemblyVersion>1.4.13.1</AssemblyVersion>
<FileVersion>1.4.13.1</FileVersion>
<LangVersion>latest</LangVersion>
<PackageRequireLicenseAcceptance>false</PackageRequireLicenseAcceptance>
<PackageLicenseFile>LICENSE.txt</PackageLicenseFile>
<PackageReadmeFile>README.md</PackageReadmeFile>
<RepositoryUrl>https://github.com/ccxt.net/ccxt.net</RepositoryUrl>
<RepositoryType>git</RepositoryType>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Debug|net472|AnyCPU'">
<DocumentationFile>bin\Debug\net472\CCXT.NET.xml</DocumentationFile>
<DefineConstants>TRACE;DEBUG</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="'$(Configuration)|$(TargetFramework)|$(Platform)'=='Release|net472|AnyCPU'">
<DocumentationFile>bin\Release\net472\CCXT.NET.xml</DocumentationFile>
<DefineConstants>TRACE;RELEASE</DefineConstants>
</PropertyGroup>

<ItemGroup>
<Compile Remove="exchanges\unknown\**" />
<EmbeddedResource Remove="exchanges\unknown\**" />
Expand Down
6 changes: 3 additions & 3 deletions src/exchanges/chn/bitforex/bitforex.cs
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ public override async ValueTask<RestRequest> CreatePostRequestAsync(string endpo
{
var _request = await base.CreatePostRequestAsync(endpoint, args);

if (IsAuthentication == true)
if (IsAuthentication)
{
var _params = new Dictionary<string, object>();
{
Expand Down Expand Up @@ -224,7 +224,7 @@ public override BoolResult GetResponseMessage(RestResponse response = null)

if (response != null)
{
if (response.IsSuccessful == true)
if (response.IsSuccessful)
{
var _json_result = this.DeserializeObject<JToken>(response.Content);

Expand All @@ -243,7 +243,7 @@ public override BoolResult GetResponseMessage(RestResponse response = null)
}
}

if (_result.success == true && response.IsSuccessful == false)
if (_result.success && response.IsSuccessful == false)
{
_result.SetFailure(
response.ErrorMessage ?? response.StatusDescription,
Expand Down
10 changes: 5 additions & 5 deletions src/exchanges/chn/bitforex/private/privateApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public override async ValueTask<Balance> FetchBalanceAsync(string base_name, str
var _result = new Balance();

var _currency_id = await publicApi.LoadCurrencyIdAsync(base_name);
if (_currency_id.success == true)
if (_currency_id.success)
{
privateClient.ExchangeInfo.ApiCallWait(TradeType.Private);

Expand All @@ -80,10 +80,10 @@ public override async ValueTask<Balance> FetchBalanceAsync(string base_name, str
_result.rawJson = _json_value.Content;
#endif
var _json_result = privateClient.GetResponseMessage(_json_value.Response);
if (_json_result.success == true)
if (_json_result.success)
{
var _balance = privateClient.DeserializeObject<BBalance>(_json_value.Content);
if (_balance.success == true)
if (_balance.success)
{
_balance.result.currency = base_name;

Expand Down Expand Up @@ -115,7 +115,7 @@ public override async ValueTask<Balances> FetchBalancesAsync(Dictionary<string,
var _result = new Balances();

var _markets = await publicApi.LoadMarketsAsync();
if (_markets.success == true)
if (_markets.success)
{
privateClient.ExchangeInfo.ApiCallWait(TradeType.Private);

Expand All @@ -126,7 +126,7 @@ public override async ValueTask<Balances> FetchBalancesAsync(Dictionary<string,
_result.rawJson = _json_value.Content;
#endif
var _json_result = privateClient.GetResponseMessage(_json_value.Response);
if (_json_result.success == true)
if (_json_result.success)
{
var _balances = privateClient.DeserializeObject<BBalances>(_json_value.Content);
{
Expand Down
24 changes: 12 additions & 12 deletions src/exchanges/chn/bitforex/public/publicApi.cs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ public override async ValueTask<Markets> FetchMarketsAsync(Dictionary<string, ob
_result.rawJson = _json_value.Content;
#endif
var _json_result = publicClient.GetResponseMessage(_json_value.Response);
if (_json_result.success == true)
if (_json_result.success)
{
var _json_markets = publicClient.DeserializeObject<BMarkets>(_json_value.Content);

Expand All @@ -70,7 +70,7 @@ public override async ValueTask<Markets> FetchMarketsAsync(Dictionary<string, ob

_m.baseName = publicClient.ExchangeInfo.GetCommonCurrencyName(_m.baseId);
_m.quoteName = publicClient.ExchangeInfo.GetCommonCurrencyName(_m.quoteId);

_m.marketId = _m.baseName + "/" + _m.quoteName;
if (_result.result.ContainsKey(_m.marketId))
continue;
Expand Down Expand Up @@ -110,7 +110,7 @@ public override async ValueTask<Ticker> FetchTickerAsync(string base_name, strin
var _result = new Ticker(base_name, quote_name);

var _market = await this.LoadMarketAsync(_result.marketId);
if (_market.success == true)
if (_market.success)
{
publicClient.ExchangeInfo.ApiCallWait(TradeType.Public);

Expand All @@ -126,7 +126,7 @@ public override async ValueTask<Ticker> FetchTickerAsync(string base_name, strin
_result.rawJson = _json_value.Content;
#endif
var _json_result = publicClient.GetResponseMessage(_json_value.Response);
if (_json_result.success == true)
if (_json_result.success)
{
var _ticker = publicClient.DeserializeObject<BTicker>(_json_value.Content);
{
Expand Down Expand Up @@ -159,7 +159,7 @@ public override async ValueTask<OrderBooks> FetchOrderBooksAsync(string base_nam
var _result = new OrderBooks(base_name, quote_name);

var _market = await this.LoadMarketAsync(_result.marketId);
if (_market.success == true)
if (_market.success)
{
publicClient.ExchangeInfo.ApiCallWait(TradeType.Public);

Expand All @@ -176,10 +176,10 @@ public override async ValueTask<OrderBooks> FetchOrderBooksAsync(string base_nam
_result.rawJson = _json_value.Content;
#endif
var _json_result = publicClient.GetResponseMessage(_json_value.Response);
if (_json_result.success == true)
if (_json_result.success)
{
var _orderbooks = publicClient.DeserializeObject<BOrderBooks>(_json_value.Content);
if (_orderbooks.success == true)
if (_orderbooks.success)
{
var _ob_asks = _orderbooks.result.asks.OrderBy(o => o.price).Take(limits).ToList();
var _ob_bids = _orderbooks.result.bids.OrderByDescending(o => o.price).Take(limits).ToList();
Expand Down Expand Up @@ -243,7 +243,7 @@ public override async ValueTask<OHLCVs> FetchOHLCVsAsync(string base_name, strin
var _result = new OHLCVs(base_name, quote_name);

var _market = await this.LoadMarketAsync(_result.marketId);
if (_market.success == true)
if (_market.success)
{
publicClient.ExchangeInfo.ApiCallWait(TradeType.Public);

Expand All @@ -264,10 +264,10 @@ public override async ValueTask<OHLCVs> FetchOHLCVsAsync(string base_name, strin
_result.rawJson = _json_value.Content;
#endif
var _json_result = publicClient.GetResponseMessage(_json_value.Response);
if (_json_result.success == true)
if (_json_result.success)
{
var _ohlcvs = publicClient.DeserializeObject<BOHLCVs>(_json_value.Content);
if (_ohlcvs.success == true)
if (_ohlcvs.success)
{
_result.result.AddRange(
_ohlcvs.result
Expand Down Expand Up @@ -307,7 +307,7 @@ public override async ValueTask<CompleteOrders> FetchCompleteOrdersAsync(string
var _result = new CompleteOrders(base_name, quote_name);

var _market = await this.LoadMarketAsync(_result.marketId);
if (_market.success == true)
if (_market.success)
{
publicClient.ExchangeInfo.ApiCallWait(TradeType.Public);

Expand All @@ -327,7 +327,7 @@ public override async ValueTask<CompleteOrders> FetchCompleteOrdersAsync(string
_result.rawJson = _json_value.Content;
#endif
var _json_result = publicClient.GetResponseMessage(_json_value.Response);
if (_json_result.success == true)
if (_json_result.success)
{
var _json_data = publicClient.DeserializeObject<BCompleteOrders>(_json_value.Content);
{
Expand Down
Loading

0 comments on commit 7d1eedc

Please sign in to comment.