示例#1
0
        internal bool TryRemoveRelationship(Snowflake id, out CachedRelationship relationship)
        {
            var result = _relationships.TryRemove(id, out relationship);

            if (result)
            {
                relationship.User.SharedUser.References--;
            }

            return(result);
        }
示例#2
0
        internal bool TryAddRelationship(CachedRelationship relationship)
        {
            var result = _relationships.TryAdd(relationship.Id, relationship);

            if (result)
            {
                relationship.User.SharedUser.References++;
            }

            return(result);
        }