コード例 #1
0
 /// <summary>
 /// Creates a new instance with the given variable name.
 /// </summary>
 /// <param name="name">The name to attach this property to.</param>
 /// <param name="kind">The kind of the property to attach.</param>
 public VariableDescriptor(string name, DescriptorKind kind)
 {
     Name      = name;
     Kind      = kind;
     _hashCode = Hash.With(name).And(kind).Get();
 }
コード例 #2
0
 /// <summary>
 /// Checks if any of the passed sets contains the desired rule.
 /// </summary>
 /// <param name="rule">The rule that has to be contained in any of the sets.</param>
 /// <param name="sets">The sets to check.</param>
 /// <returns><code>True</code> if any of the sets contains the specified rules.</returns>
 public static bool AnyContainsRule(DescriptorKind rule, params ISet <DescriptorKind>[] sets)
 {
     return(sets.Any(set => set.Contains(rule)));
 }