Esempio n. 1
0
 /// <summary>
 /// Checks If teamable and other have the same relation.
 /// </summary>
 /// <param name="teamable">This teamable.</param>
 /// <param name="other">The other teamable.</param>
 /// <returns>True if they have the same relation.</returns>
 public static bool IsRelationSymetric(this ITeamable teamable, ITeamable other) => teamable.GetRelation(other) == other.GetRelation(teamable);
Esempio n. 2
0
        public bool IsAllowed(ITeamable otherTeamable)
        {
            var relation = _teamable.GetRelation(otherTeamable);

            return(IsAllowed(relation));
        }
Esempio n. 3
0
 /// <summary>
 /// Check if the provided relation is the relation from other to teamable.
 /// </summary>
 /// <param name="teamable">This teamable.</param>
 /// <param name="other">The other teamable.</param>
 /// <param name="relation">The relation to check.</param>
 /// <returns>True if the relation between the two is the same as the one provided.</returns>
 public static bool IsRelation(this ITeamable teamable, ITeamable other, TeamRelation relation) => teamable.GetRelation(other) == relation;