Skip to content
This repository was archived by the owner on Nov 14, 2023. It is now read-only.

Commit 988a6ad

Browse files
author
QuantumBranch
committed
Added gitignore, changed namespace name
1 parent 2a57809 commit 988a6ad

File tree

10 files changed

+632
-9
lines changed

10 files changed

+632
-9
lines changed

.gitignore

Lines changed: 568 additions & 0 deletions
Large diffs are not rendered by default.

Containers/ByteArray.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,9 @@
1313
// See the License for the specific language governing permissions and
1414
// limitations under the License.
1515

16-
using System;
1716
using System.IO;
1817

19-
namespace QuantumBranch.OpenSharedLibrary
18+
namespace OpenSharedLibrary
2019
{
2120
/// <summary>
2221
/// Byte array container class

Containers/Chance.cs

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+

2+
// Copyright 2019 Nikita Fediuchin (QuantumBranch)
3+
//
4+
// Licensed under the Apache License, Version 2.0 (the "License");
5+
// you may not use this file except in compliance with the License.
6+
// You may obtain a copy of the License at
7+
//
8+
// http://www.apache.org/licenses/LICENSE-2.0
9+
//
10+
// Unless required by applicable law or agreed to in writing, software
11+
// distributed under the License is distributed on an "AS IS" BASIS,
12+
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
// See the License for the specific language governing permissions and
14+
// limitations under the License.
15+
16+
using System;
17+
18+
namespace OpenSharedLibrary
19+
{
20+
/// <summary>
21+
/// Chance container structure (from 0.0f to 100.0f)
22+
/// </summary>
23+
public struct Chance
24+
{
25+
/// <summary>
26+
/// Chance value
27+
/// </summary>
28+
private readonly float value;
29+
30+
/// <summary>
31+
/// Creates a new chance structure instance
32+
/// </summary>
33+
public Chance(float value)
34+
{
35+
if (value < 0.0f || value > 100.0f)
36+
throw new ArgumentOutOfRangeException(nameof(value));
37+
38+
this.value = value;
39+
}
40+
41+
/// <summary>
42+
/// Returns chance value
43+
/// </summary>
44+
public static implicit operator float(Chance chance)
45+
{
46+
return chance.value;
47+
}
48+
/// <summary>
49+
/// Returns chance value
50+
/// </summary>
51+
public static implicit operator Chance(float value)
52+
{
53+
return new Chance(value);
54+
}
55+
}
56+
}

Containers/EmailAddress.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
using System.Net.Mail;
1919
using System.Text;
2020

21-
namespace QuantumBranch.OpenSharedLibrary
21+
namespace OpenSharedLibrary
2222
{
2323
/// <summary>
2424
/// Email adderss container

Containers/Passhash.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
using System.Numerics;
1919
using System.Text;
2020

21-
namespace QuantumBranch.OpenSharedLibrary
21+
namespace OpenSharedLibrary
2222
{
2323
/// <summary>
2424
/// Password hash container

Containers/Token.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
using System;
1717
using System.IO;
1818

19-
namespace QuantumBranch.OpenSharedLibrary
19+
namespace OpenSharedLibrary
2020
{
2121
/// <summary>
2222
/// Token container class

Containers/Username.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
using System.IO;
1818
using System.Text;
1919

20-
namespace QuantumBranch.OpenSharedLibrary
20+
namespace OpenSharedLibrary
2121
{
2222
/// <summary>
2323
/// Alphanumeric lowercase username container (with "_")

Interfaces/IByteArray.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
using System.IO;
1717

18-
namespace QuantumBranch.OpenSharedLibrary
18+
namespace OpenSharedLibrary
1919
{
2020
/// <summary>
2121
/// Byte array interface

Systems/Cryptographer.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
using System.Security.Cryptography;
1717
using System.Text;
1818

19-
namespace QuantumBranch.OpenSharedLibrary
19+
namespace OpenSharedLibrary
2020
{
2121
/// <summary>
2222
/// Cryptography usefull method container class

Systems/VectorExtension.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
using System.IO;
1717
using System.Numerics;
1818

19-
namespace QuantumBranch.OpenSharedLibrary
19+
namespace OpenSharedLibrary
2020
{
2121
/// <summary>
2222
/// Vector classes extension container class

0 commit comments

Comments
 (0)