/// <summary> /// Initialize a new MemberRestriction. /// </summary> /// <param name="memberName">The member that will be checked for this Restriction.</param> /// <param name="applicableBaseType">The base Type this Restriction will apply to.</param> /// <param name="message">The Message that will be shown upon failing the Restriction.</param> /// <param name="restrictionMode">Should it be required or prohibited?</param> public MemberRestriction(MemberName memberName, TypeName applicableBaseType, string message, RestrictionMode restrictionMode) : base(applicableBaseType, message, restrictionMode) { this.memberName = memberName; }
/// <summary> /// Initialize a new Restriction. /// </summary> /// <param name="applicableBaseType">The base Type this Restriction will apply to.</param> /// <param name="message">The Message that will be shown upon failing the Restriction.</param> /// <param name="restrictionMode">Should it be required or prohibited?</param> protected Restriction(TypeName applicableBaseType, string message, RestrictionMode restrictionMode) { this.applicableBaseType = applicableBaseType; this.message = message; this.restrictionMode = restrictionMode; }
/// <summary> /// Initialize a new InheritanceRestriction. /// </summary> /// <param name="type">The Type that will be checked for this Restriction</param> /// <param name="applicableBaseType">The base Type this Restriction will apply to.</param> /// <param name="message">The Message that will be shown upon failing the Restriction.</param> /// <param name="restrictionMode">Should it be required or prohibited?</param> public InheritanceRestriction(TypeName type, TypeName applicableBaseType, string message, RestrictionMode restrictionMode) : base(applicableBaseType, message, restrictionMode) { this.type = type; }
/// <summary> /// Initialize a new NamespaceRestriction /// </summary> /// <param name="nameSpace">The namespace that will be checked for this restriction.</param> /// <param name="includeNested">Should nested namespaces be restricted as well?</param> /// <param name="applicableBaseType">The base Type this Restriction will apply to.</param> /// <param name="message">The Message that will be shown upon failing the Restriction.</param> /// <param name="restrictionMode">Should it be required or prohibited?</param> public NamespaceRestriction(string nameSpace, bool includeNested, TypeName applicableBaseType, string message, RestrictionMode restrictionMode) : base(applicableBaseType, message, restrictionMode) { this.nameSpace = nameSpace; this.includeNested = includeNested; }