-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' of https://github.com/dsanchezcr/website
- Loading branch information
Showing
5 changed files
with
258 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
--- | ||
title: Colones Exchange Rate - NuGet Package | ||
description: In this post I am introducing a new NuGet package that I created to get the exchange rate of the Costa Rican Colón currency conversion to US Dollars and Euros. | ||
slug: colones-exchange-rate-package | ||
authors: [dsanchezcr] | ||
tags: [NuGet, .NET Standard, Colones, Exchange Rate, Costa Rica] | ||
enableComments: true | ||
hide_table_of_contents: true | ||
image: https://raw.githubusercontent.com/dsanchezcr/website/main/static/img/ColonesExchangeRate/Icon.png | ||
date: 2023-11-06T18:00 | ||
--- | ||
|
||
# Colones Exchange Rate - NuGet Package | ||
|
||
In this post I am introducing [a new NuGet package](https://nuget.org/packages/ColonesExchangeRate) that I created to get the exchange rate of the Costa Rican Colón currency conversion to US Dollars and Euros. | ||
|
||
<!--truncate--> | ||
|
||
## Key Features | ||
|
||
- Get the exchange rate of the Costa Rican Colón currency conversion to US Dollars and Euros. | ||
- Get today's exchange rate of the Costa Rican Colón currency information for US Dollars and Euros. | ||
- Consumes the API from the Ministerio de Hacienda de Costa Rica. | ||
|
||
## How to use it | ||
|
||
### Install the NuGet package | ||
|
||
```powershell | ||
Install-Package ColonesExchangeRate | ||
``` | ||
|
||
### Get the exchange rate | ||
|
||
```csharp | ||
var _converter = new CurrencyConverter(); | ||
decimal amount = 1000; | ||
|
||
var dolaresAColones = await _converter.DollarsToColones(amount); | ||
Console.WriteLine($"{amount} dólares son {dolaresAColones} colones."); | ||
|
||
var colonesADolares = await _converter.ColonesToDollars(amount); | ||
Console.WriteLine($"{amount} colones son {colonesADolares} dólares."); | ||
|
||
var dolaresAEuros = await _converter.DollarsToEuros(amount); | ||
Console.WriteLine($"{amount} dólares son {dolaresAEuros} euros."); | ||
|
||
var eurosADolares = await _converter.EurosToDollars(amount); | ||
Console.WriteLine($"{amount} euros son {eurosADolares} dólares."); | ||
|
||
var colonesAEuros = await _converter.ColonesToEuros(amount); | ||
Console.WriteLine($"{amount} colones son {colonesAEuros} euros."); | ||
|
||
var eurosAColones = await _converter.EurosToColones(amount); | ||
Console.WriteLine($"{amount} euros son {eurosAColones} colones."); | ||
|
||
var (date, sale, purchase) = await _converter.GetDollarExchangeRate(true); | ||
Console.WriteLine($"Dólar - Fecha: {date}, Venta: {sale}, Compra: {purchase}"); | ||
var (_date, dollars, colones) = await _converter.GetEuroExchangeRate(true); | ||
Console.WriteLine($"Euro - Fecha: {_date}, Dolares: {dollars}, Colones: {colones}"); | ||
``` | ||
The output will be: | ||
![](../static/img/ColonesExchangeRate/ConsoleResult.jpg) | ||
## Source Code | ||
The source code is available on [GitHub](https://github.com/dsanchezcr/ColonesExchangeRate). Feel free to contribute to the project. | ||
> Note: This repository also deploys the NuGet package to GitHub Packages. | ||
## NuGet Package | ||
The NuGet package is available on [nuget.org](https://nuget.org/packages/ColonesExchangeRate). | ||
## References | ||
- [Ministerio de Hacienda de Costa Rica](https://api.hacienda.go.cr/indicadores/tc) | ||
## Conclusion | ||
I hope you find this NuGet package useful. If you have any questions or comments, please leave them below. | ||
Thanks for reading and happy coding! |
86 changes: 86 additions & 0 deletions
86
i18n/es/docusaurus-plugin-content-blog/2023-11-06-ColonesExchangeRate.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
--- | ||
title: Tipo de cambio de colones - Paquete NuGet | ||
description: En esta publicación presento un nuevo paquete NuGet que creé para obtener el tipo de cambio de la conversión de la moneda del colon costarricense a dólares estadounidenses y euros. | ||
slug: colones-exchange-rate-package | ||
authors: [dsanchezcr] | ||
tags: [NuGet, .NET Standard, Colones, Exchange Rate, Costa Rica] | ||
enableComments: true | ||
hide_table_of_contents: true | ||
image: https://raw.githubusercontent.com/dsanchezcr/website/main/static/img/ColonesExchangeRate/Icon.png | ||
date: 2023-11-06T18:00 | ||
--- | ||
|
||
# Tipo de cambio de colones - Paquete NuGet | ||
|
||
En este post presento [un nuevo paquete NuGet](https://nuget.org/packages/ColonesExchangeRate) que creé para obtener el tipo de cambio del Colón costarricense conversión de moneda a Dólares y Euros. | ||
|
||
<!--truncate--> | ||
|
||
## Características principales | ||
|
||
* Obtenga el tipo de cambio del Colón costarricense de conversión a dólares estadounidenses y euros. | ||
* Obtenga información sobre el tipo de cambio del día del Colón costarricense para Dólares y Euros. | ||
* Consume la API del Ministerio de Hacienda de Costa Rica. | ||
|
||
## Cómo usarlo | ||
|
||
### Instalación del paquete NuGet | ||
|
||
```powershell | ||
Install-Package ColonesExchangeRate | ||
``` | ||
|
||
### Obtener el tipo de cambio | ||
|
||
```csharp | ||
var _converter = new CurrencyConverter(); | ||
decimal amount = 1000; | ||
|
||
var dolaresAColones = await _converter.DollarsToColones(amount); | ||
Console.WriteLine($"{amount} dólares son {dolaresAColones} colones."); | ||
|
||
var colonesADolares = await _converter.ColonesToDollars(amount); | ||
Console.WriteLine($"{amount} colones son {colonesADolares} dólares."); | ||
|
||
var dolaresAEuros = await _converter.DollarsToEuros(amount); | ||
Console.WriteLine($"{amount} dólares son {dolaresAEuros} euros."); | ||
|
||
var eurosADolares = await _converter.EurosToDollars(amount); | ||
Console.WriteLine($"{amount} euros son {eurosADolares} dólares."); | ||
|
||
var colonesAEuros = await _converter.ColonesToEuros(amount); | ||
Console.WriteLine($"{amount} colones son {colonesAEuros} euros."); | ||
|
||
var eurosAColones = await _converter.EurosToColones(amount); | ||
Console.WriteLine($"{amount} euros son {eurosAColones} colones."); | ||
|
||
var (date, sale, purchase) = await _converter.GetDollarExchangeRate(true); | ||
Console.WriteLine($"Dólar - Fecha: {date}, Venta: {sale}, Compra: {purchase}"); | ||
var (_date, dollars, colones) = await _converter.GetEuroExchangeRate(true); | ||
Console.WriteLine($"Euro - Fecha: {_date}, Dolares: {dollars}, Colones: {colones}"); | ||
``` | ||
El resultado será: | ||
![](pathname:///img/ColonesExchangeRate/ConsoleResult.jpg) | ||
## Código fuente | ||
El código fuente está disponible en [GitHub (en inglés)](https://github.com/dsanchezcr/ColonesExchangeRate). Siéntase libre de contribuir al proyecto. | ||
> Nota: Este repositorio también implementa el paquete NuGet en GitHub Packages. | ||
## Paquete NuGet | ||
El paquete NuGet está disponible en [nuget.org](https://nuget.org/packages/ColonesExchangeRate). | ||
## Referencias | ||
* [Ministerio de Hacienda de Costa Rica](https://api.hacienda.go.cr/indicadores/tc) | ||
## Conclusión | ||
Espero que este paquete NuGet le resulte útil. Si tiene alguna pregunta o comentario, déjelo a continuación. | ||
¡Gracias por leer y feliz desarrollo! |
86 changes: 86 additions & 0 deletions
86
i18n/pt/docusaurus-plugin-content-blog/2023-11-06-ColonesExchangeRate.mdx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
--- | ||
title: Taxa de câmbio Colones - NuGet | ||
description: Neste post estou apresentando um novo NuGet que criei para obter a taxa de câmbio da conversão da moeda Costa Rica Colón para dólares americanos e euros. | ||
slug: colones-exchange-rate-package | ||
authors: [dsanchezcr] | ||
tags: [NuGet, .NET Standard, Colones, Exchange Rate, Costa Rica] | ||
enableComments: true | ||
hide_table_of_contents: true | ||
image: https://raw.githubusercontent.com/dsanchezcr/website/main/static/img/ColonesExchangeRate/Icon.png | ||
date: 2023-11-06T18:00 | ||
--- | ||
|
||
# Taxa de câmbio Colones - NuGet | ||
|
||
Neste post estou apresentando [um novo NuGet](https://nuget.org/packages/ColonesExchangeRate) que eu criei para obter a taxa de câmbio da conversão de moeda Colón da Costa Rica para dólares americanos e euros. | ||
|
||
<!--truncate--> | ||
|
||
## Principais características | ||
|
||
* Obtenha a taxa de câmbio da conversão da moeda Costa Rica Colón para Dólares Americanos e Euros. | ||
* Obtenha a taxa de câmbio de hoje das informações da moeda Colón da Costa Rica para Dólares americanos e euros. | ||
* Consome a API do Ministerio de Hacienda de Costa Rica. | ||
|
||
## Como usá-lo | ||
|
||
### Instalar o NuGet | ||
|
||
```powershell | ||
Install-Package ColonesExchangeRate | ||
``` | ||
|
||
### Obter a taxa de câmbio | ||
|
||
```csharp | ||
var _converter = new CurrencyConverter(); | ||
decimal amount = 1000; | ||
|
||
var dolaresAColones = await _converter.DollarsToColones(amount); | ||
Console.WriteLine($"{amount} dólares son {dolaresAColones} colones."); | ||
|
||
var colonesADolares = await _converter.ColonesToDollars(amount); | ||
Console.WriteLine($"{amount} colones son {colonesADolares} dólares."); | ||
|
||
var dolaresAEuros = await _converter.DollarsToEuros(amount); | ||
Console.WriteLine($"{amount} dólares son {dolaresAEuros} euros."); | ||
|
||
var eurosADolares = await _converter.EurosToDollars(amount); | ||
Console.WriteLine($"{amount} euros son {eurosADolares} dólares."); | ||
|
||
var colonesAEuros = await _converter.ColonesToEuros(amount); | ||
Console.WriteLine($"{amount} colones son {colonesAEuros} euros."); | ||
|
||
var eurosAColones = await _converter.EurosToColones(amount); | ||
Console.WriteLine($"{amount} euros son {eurosAColones} colones."); | ||
|
||
var (date, sale, purchase) = await _converter.GetDollarExchangeRate(true); | ||
Console.WriteLine($"Dólar - Fecha: {date}, Venta: {sale}, Compra: {purchase}"); | ||
var (_date, dollars, colones) = await _converter.GetEuroExchangeRate(true); | ||
Console.WriteLine($"Euro - Fecha: {_date}, Dolares: {dollars}, Colones: {colones}"); | ||
``` | ||
A saída será: | ||
![](pathname:///img/ColonesExchangeRate/ConsoleResult.jpg) | ||
## Código Fonte | ||
O código-fonte está disponível em [GitHub](https://github.com/dsanchezcr/ColonesExchangeRate). Sinta-se à vontade para contribuir com o projeto. | ||
> Nota: Este repositório também implementa o NuGet em GitHub Packages. | ||
## NuGet | ||
O NuGet está disponível em [nuget.org](https://nuget.org/packages/ColonesExchangeRate). | ||
## Referências | ||
* [Ministerio de Hacienda de Costa Rica](https://api.hacienda.go.cr/indicadores/tc) | ||
## Conclusão | ||
Espero que você ache este NuGet útil. Se você tiver alguma dúvida ou comentário, por favor, deixe-os abaixo. | ||
Obrigado pela leitura e feliz desenvolvimento! |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.