mirror of
https://github.com/tonytins/Lorem.NET.git
synced 2025-03-22 07:32:23 +00:00
made Lorem partial class - updated readme
This commit is contained in:
parent
246072a200
commit
c7e71b13de
10 changed files with 37 additions and 3 deletions
Binary file not shown.
|
@ -4,7 +4,7 @@ using System.Linq;
|
||||||
|
|
||||||
namespace LoremNET
|
namespace LoremNET
|
||||||
{
|
{
|
||||||
public class Lorem
|
public partial class Lorem
|
||||||
{
|
{
|
||||||
public static bool Chance(int successes, int attempts)
|
public static bool Chance(int successes, int attempts)
|
||||||
{
|
{
|
||||||
|
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
NuGet/Lorem.NET.1.0.4.nupkg
Normal file
BIN
NuGet/Lorem.NET.1.0.4.nupkg
Normal file
Binary file not shown.
19
readme.html
19
readme.html
|
@ -51,5 +51,22 @@ string number = LoremNET.Lorem.Random(numbers);
|
||||||
<p>Lorem.NET includes a thread-safe System.Random instance.</p>
|
<p>Lorem.NET includes a thread-safe System.Random instance.</p>
|
||||||
|
|
||||||
<p><code>csharp
|
<p><code>csharp
|
||||||
int i = LoremNET.RandomHelper.Instance.Next(1, 2)
|
int i = LoremNET.RandomHelper.Instance.Next(1, 2);
|
||||||
|
</code></p>
|
||||||
|
|
||||||
|
<h3>Extending the Class</h3>
|
||||||
|
|
||||||
|
<p>If you want to extend the class to add more methods, go right ahead!</p>
|
||||||
|
|
||||||
|
<p><code>csharp
|
||||||
|
namespace LoremNET
|
||||||
|
{
|
||||||
|
public partial class Lorem
|
||||||
|
{
|
||||||
|
public static string Email(string domain)
|
||||||
|
{
|
||||||
|
return Email().Replace(".com", string.Format(".{0}", domain));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
</code></p>
|
</code></p>
|
||||||
|
|
19
readme.md
19
readme.md
|
@ -53,5 +53,22 @@ string number = LoremNET.Lorem.Random(numbers);
|
||||||
Lorem.NET includes a thread-safe System.Random instance.
|
Lorem.NET includes a thread-safe System.Random instance.
|
||||||
|
|
||||||
```csharp
|
```csharp
|
||||||
int i = LoremNET.RandomHelper.Instance.Next(1, 2)
|
int i = LoremNET.RandomHelper.Instance.Next(1, 2);
|
||||||
|
```
|
||||||
|
|
||||||
|
### Extending the Class
|
||||||
|
|
||||||
|
If you want to extend the class to add more methods, go right ahead!
|
||||||
|
|
||||||
|
```csharp
|
||||||
|
namespace LoremNET
|
||||||
|
{
|
||||||
|
public partial class Lorem
|
||||||
|
{
|
||||||
|
public static string Email(string domain)
|
||||||
|
{
|
||||||
|
return Email().Replace(".com", string.Format(".{0}", domain));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
```
|
```
|
Loading…
Add table
Reference in a new issue