File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change 4
4
<TargetFramework >netstandard2.0</TargetFramework >
5
5
<RootNamespace >KY.Core</RootNamespace >
6
6
<AssemblyName >KY.Core.Common</AssemblyName >
7
- <Version >4.34.1 </Version >
7
+ <Version >4.35.0 </Version >
8
8
<Authors >KY-Programming</Authors >
9
9
<Company >KY-Programmingp</Company >
10
10
<Product >KY.Core</Product >
36
36
<AutoGen >True</AutoGen >
37
37
<DependentUpon >Resources.resx</DependentUpon >
38
38
</Compile >
39
+ <Compile Remove =" Nuget\AssemblyLocation.cs" />
40
+ <Compile Remove =" Nuget\AssemblyLocator.cs" />
41
+ <Compile Remove =" Nuget\AssemblySearchParameters.cs" />
39
42
</ItemGroup >
40
43
41
44
<ItemGroup >
Original file line number Diff line number Diff line change @@ -8,11 +8,15 @@ namespace KY.Core
8
8
public static class Random2
9
9
{
10
10
private static readonly Random random = new Random ( ) ;
11
- private static string defaultAlphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-!?@" ;
11
+ public const string DefaultAlphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-!?@" ;
12
+ public const string Base64Alphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789+/" ;
13
+ public const string Base32Alphabet = "abcdefghijklmnopqrstuvwxyz234567" ;
14
+ public const string Base36Alphabet = "abcdefghijklmnopqrstuvwxyz0123456789" ;
15
+ public const string UrlSafeAlphabet = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789-_" ;
12
16
13
17
public static string NextString ( int minLength = 5 , int maxLength = 25 , string alphabet = null )
14
18
{
15
- alphabet = alphabet ?? defaultAlphabet ;
19
+ alphabet ??= DefaultAlphabet ;
16
20
int length = random . Next ( minLength , maxLength ) ;
17
21
StringBuilder builder = new StringBuilder ( length ) ;
18
22
for ( int i = 0 ; i < length ; i ++ )
@@ -64,4 +68,4 @@ public static IList<T> Unorder<T>(IList<T> list)
64
68
return list . OrderBy ( x => order [ x ] ) . ToList ( ) ;
65
69
}
66
70
}
67
- }
71
+ }
You can’t perform that action at this time.
0 commit comments