Example #1
0
 /// <summary>
 /// Generates a userId or populates the userId property if provided one
 /// </summary>
 public void PrepareAndSetUserId(string inputUserId = null)
 {
     if (string.IsNullOrEmpty(inputUserId) == false)
     {
         if (userId != inputUserId)
         {
             userId = inputUserId;
             this.SaveSwrveUserId(userId);
         }
     }
     else if (string.IsNullOrEmpty(userId) && string.IsNullOrEmpty(inputUserId))
     {
         userId = SwrveHelper.GetRandomUUID();
         this.SaveSwrveUserId(userId);
     }
 }