File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
clients/algoliasearch-client-csharp/algoliasearch/Utils Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 11using System ;
22using System . Collections . Generic ;
33using System . Linq ;
4+ using System . Security . Cryptography ;
45using System . Text ;
56using System . Text . Json ;
67using System . Text . RegularExpressions ;
@@ -932,8 +933,8 @@ public async Task<ReplaceAllObjectsResponse> ReplaceAllObjectsAsync<T>(
932933 scopes = new List < ScopeType > { ScopeType . Settings , ScopeType . Rules , ScopeType . Synonyms } ;
933934 }
934935
935- var rnd = new Random ( ) ;
936- var tmpIndexName = $ "{ indexName } _tmp_{ rnd . Next ( 100 ) } ";
936+ var randomSuffix = 100_000 + RandomNumberGenerator . GetInt32 ( 900_000 ) ;
937+ var tmpIndexName = $ "{ indexName } _tmp_{ randomSuffix } ";
937938
938939 try
939940 {
@@ -1425,8 +1426,7 @@ public async Task<ReplaceAllObjectsWithTransformationResponse> ReplaceAllObjects
14251426 scopes = new List < ScopeType > { ScopeType . Settings , ScopeType . Rules , ScopeType . Synonyms } ;
14261427 }
14271428
1428- var random = new Random ( ) ;
1429- var randomSuffix = random . Next ( 100000 , 1000000 ) ;
1429+ var randomSuffix = 100_000 + RandomNumberGenerator . GetInt32 ( 900_000 ) ;
14301430 var tmpIndexName = $ "{ indexName } _tmp_{ randomSuffix } ";
14311431
14321432 try
You can’t perform that action at this time.
0 commit comments