Skip to content

Commit

Permalink
Merge branch 'main' into vNext
Browse files Browse the repository at this point in the history
  • Loading branch information
lpeyr committed Dec 3, 2023
2 parents da38ead + 938ccc7 commit 1e7505c
Show file tree
Hide file tree
Showing 308 changed files with 3,970 additions and 5,677 deletions.
8 changes: 4 additions & 4 deletions Documentation/.vitepress/cache/deps/_metadata.json
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
{
"hash": "03811873",
"browserHash": "53b2476a",
"hash": "34492b1c",
"browserHash": "2b39ce1b",
"optimized": {
"vue": {
"src": "../../../node_modules/vue/dist/vue.runtime.esm-bundler.js",
"file": "vue.js",
"fileHash": "2c38057d",
"fileHash": "af835cf8",
"needsInterop": false
},
"vitepress > @vue/devtools-api": {
"src": "../../../node_modules/@vue/devtools-api/lib/esm/index.js",
"file": "vitepress___@vue_devtools-api.js",
"fileHash": "27e65257",
"fileHash": "96dbe170",
"needsInterop": false
}
},
Expand Down
65 changes: 49 additions & 16 deletions Documentation/.vitepress/cache/deps/vue.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions Documentation/.vitepress/cache/deps/vue.js.map

Large diffs are not rendered by default.

92 changes: 92 additions & 0 deletions Documentation/core/converters/temperatures.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,3 +60,95 @@ using PeyrSharp.Core.Converters;
double c = Temperatures.FahrenheitToCelsius(75);
// c = 23.88888888888889
```

### CelsiusToKelvin(celsius)

#### Definition

Converts a temperature value from Celsius to Kelvin.

#### Arguments

| Type | Name | Meaning |
| -------- | --------- | -------------------------------------------- |
| `double` | `celsius` | The temperature value in Celsius to convert. |

#### Returns

The temperature value in Kelvin.

#### Usage

```c#
double celsius = 25.0;
double kelvin = Temperature.CelsiusToKelvin(celsius);
```

### FahrenheitToKelvin(fahrenheit)

#### Definition

Converts a temperature value from Fahrenheit to Kelvin.

#### Arguments

| Type | Name | Meaning |
| -------- | ------------ | ----------------------------------------------- |
| `double` | `fahrenheit` | The temperature value in Fahrenheit to convert. |

#### Returns

The temperature value in Kelvin.

#### Usage

```c#
double fahrenheit = 77.0;
double kelvin = Temperature.FahrenheitToKelvin(fahrenheit);
```

### KelvinToCelsius(kelvin)

#### Definition

Converts a temperature value from Kelvin to Celsius.

#### Arguments

| Type | Name | Meaning |
| -------- | -------- | ------------------------------------------- |
| `double` | `kelvin` | The temperature value in Kelvin to convert. |

#### Returns

The temperature value in Celsius.

#### Usage

```c#
double kelvin = 298.15;
double celsius = Temperature.KelvinToCelsius(kelvin);
```

### KelvinToFahrenheit(kelvin)

#### Definition

Converts a temperature value from Kelvin to Fahrenheit.

#### Arguments

| Type | Name | Meaning |
| -------- | -------- | ------------------------------------------- |
| `double` | `kelvin` | The temperature value in Kelvin to convert. |

#### Returns

The temperature value in Fahrenheit.

#### Usage

```c#
double kelvin = 298.15;
double fahrenheit = Temperature.KelvinToFahrenheit(kelvin);
```
44 changes: 44 additions & 0 deletions Documentation/core/internet.md
Original file line number Diff line number Diff line change
Expand Up @@ -242,3 +242,47 @@ using PeyrSharp.Core;
bool valid = Internet.GetUrlProtocol("a/test");
// valid = false
```

### DownloadFile(link, path)

#### Definition

Downloads a file from a specified link and saves it to a specified path.

#### Arguments

| Type | Name | Meaning |
| -------- | ------ | ---------------------------------------------- |
| `string` | `link` | The URL of the file to download. |
| `string` | `path` | The local path where the file should be saved. |

#### Returns

Returns `true` if the file was downloaded and saved successfully, otherwise returns `false`.

#### Exceptions

| Type | Meaning |
| ------------------ | --------------------------------------------------------------------------- |
| `System.Exception` | Throws an exception if an error occurs during the download or save process. |

#### Usage

```c#
using System;
using System.IO;
using System.Net.Http;
using System.Threading.Tasks;
using PeyrSharp.Core;

bool success = await Internet.DownloadFile("https://example.com/file.txt", "C:\\path\\file.txt");

if (success)
{
Console.WriteLine("File downloaded and saved successfully.");
}
else
{
Console.WriteLine("Failed to download or save the file.");
}
```
39 changes: 37 additions & 2 deletions Documentation/core/password.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,41 @@ private async void Main()
}
```

### GenerateAsync(length, chars)

#### Definition

Asynchronously generates a string of a specified length using a given set of characters.

#### Arguments

| Type | Name | Meaning |
| ---------- | -------- | -------------------------------------------------------- |
| `int` | `length` | The length of the string to generate. |
| `string[]` | `chars` | An array of characters to use for generating the string. |

#### Returns

A task that represents the asynchronous operation. The task result contains the generated string.

#### Exceptions

| Type | Condition |
| ----------- | ------------------------------------------------------------------ |
| `Exception` | Throws an exception if the length parameter is not greater than 0. |

#### Usage

```c#
using PeyrSharp.Core;
private async void Main()
{
int length = 10;
string[] chars = { "a", "b", "c" };
string password = await Password.GenerateAsync(length, chars);
}
```

### GenerateAsync(length, passwordPresets)

#### Definition
Expand Down Expand Up @@ -108,10 +143,10 @@ The `GenerateAsync()` method generates a specific amount of passwords with speci
#### Arguments

| Type | Name | Meaning |
| ---------------------------------------------------- | ----------------- | ----------------------------------------------------- | --- |
| ---------------------------------------------------- | ----------------- | ----------------------------------------------------- |
| `int` | `amount` | The amount of passwords to generate. |
| `int` | `length` | The length of the password. |
| [`PasswordPresets`](../enumerations#passwordpresets) | `passwordPresets` | The password preset used when generating the password | |
| [`PasswordPresets`](../enumerations#passwordpresets) | `passwordPresets` | The password preset used when generating the password |

#### Usage

Expand Down
Loading

0 comments on commit 1e7505c

Please sign in to comment.