Beispiel #1
0
 static Critical()
 {
     if (Memory.ActiveBox.Check <Critical.CriticalConfig>((string)null))
     {
         Critical.Data = Memory.ActiveBox.Revive <Critical.CriticalConfig>((string)null);
     }
     else
     {
         Critical.Data = new Critical.CriticalConfig();
         Critical.SetDeviceId(Identification.GetDeviceId());
     }
     Critical.Data.ApiKeys    = Critical.Data.ApiKeys ?? new List <Guid>();
     Critical.UuidChangesLock = new object();
 }
Beispiel #2
0
        public static void SetUuid(string uuid)
        {
            if (uuid == null)
            {
                return;
            }
            bool flag = false;

            lock (Critical.UuidChangesLock)
            {
                if (Critical.Data.Uuid == null)
                {
                    flag = true;
                    Critical.Data.Uuid = uuid;
                }
            }
            if (!flag)
            {
                return;
            }
            Critical.Submit();
        }
Beispiel #3
0
 public static bool IsDeviceIdRequired()
 {
     return(string.IsNullOrWhiteSpace(Critical.GetDeviceId()));
 }
Beispiel #4
0
 public static bool IsUuidRequired()
 {
     return(string.IsNullOrWhiteSpace(Critical.GetUuid()));
 }
Beispiel #5
0
 public static void SetDeviceId(string deviceId)
 {
     Critical.Data.DeviceId = deviceId;
     Critical.Submit();
 }