Browse Source

Merge pull request #1825 from abpframework/maliming/guid

Remove unnecessary locks that create Guid.
pull/1850/head
Halil İbrahim Kalkan 7 years ago
committed by GitHub
parent
commit
97cd1e4eb5
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      framework/src/Volo.Abp.Guids/Volo/Abp/Guids/SequentialGuidGenerator.cs

3
framework/src/Volo.Abp.Guids/Volo/Abp/Guids/SequentialGuidGenerator.cs

@ -2,7 +2,6 @@
using System.Security.Cryptography;
using Microsoft.Extensions.Options;
using Volo.Abp.DependencyInjection;
using Volo.Abp.Threading;
namespace Volo.Abp.Guids
{
@ -32,7 +31,7 @@ namespace Volo.Abp.Guids
{
// We start with 16 bytes of cryptographically strong random data.
var randomBytes = new byte[10];
RandomNumberGenerator.Locking(r => r.GetBytes(randomBytes));
RandomNumberGenerator.GetBytes(randomBytes);
// An alternate method: use a normally-created GUID to get our initial
// random data:

Loading…
Cancel
Save