Example #1
0
        public UuidReference GetUuidReference(User userObj)
        {
            if (TryGetValue(userObj.Uuid, out UuidReference reference))
            {
                return(reference);
            }

            var uuidRef = new UuidReference(userObj.Name)
            {
                AccountUuid = userObj.AccountUuid,
                UserUuid    = userObj.Uuid
            };

            SetWithIndex(userObj.Uuid, uuidRef, userObj.Name);
            return(Get <UuidReference>(userObj.Uuid));
        }
Example #2
0
 public T GetOrCreate <T>(UuidReference reference) => GetOrCreateByUuid <T>(reference.UserUuid, reference.UserName);