fixed guid
This commit is contained in:
parent
a52697864b
commit
91d9ee7d99
1 changed files with 5 additions and 5 deletions
|
@ -52,18 +52,18 @@ namespace WebsitePanel.EnterpriseServer
|
||||||
60000, // start from 1 minute
|
60000, // start from 1 minute
|
||||||
60000); // invoke each minute
|
60000); // invoke each minute
|
||||||
|
|
||||||
protected static Guid? _Guid;
|
|
||||||
|
|
||||||
public static Guid Guid
|
public static Guid Guid
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
{
|
{
|
||||||
if (_Guid == null)
|
Guid? guid = (Guid?)Thread.GetData(Thread.GetNamedDataSlot("BackgroundTaskGuid"));
|
||||||
|
if (!guid.HasValue)
|
||||||
{
|
{
|
||||||
_Guid = Guid.NewGuid();
|
guid = Guid.NewGuid();
|
||||||
|
Thread.SetData(Thread.GetNamedDataSlot("BackgroundTaskGuid"), guid.Value);
|
||||||
}
|
}
|
||||||
|
|
||||||
return _Guid.Value;
|
return guid.Value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue