<Type Name="UseFlagsAttributeRule" FullName="Gendarme.Rules.Design.UseFlagsAttributeRule">
  <TypeSignature Language="C#" Value="public sealed class UseFlagsAttributeRule : Gendarme.Framework.Rule, Gendarme.Framework.ITypeRule" />
  <TypeSignature Language="ILAsm" Value=".class public auto ansi sealed beforefieldinit UseFlagsAttributeRule extends Gendarme.Framework.Rule implements class Gendarme.Framework.IRule, class Gendarme.Framework.ITypeRule" />
  <AssemblyInfo>
    <AssemblyName>Gendarme.Rules.Design</AssemblyName>
    <AssemblyVersion>2.11.0.0</AssemblyVersion>
  </AssemblyInfo>
  <Base>
    <BaseTypeName>Gendarme.Framework.Rule</BaseTypeName>
  </Base>
  <Interfaces>
    <Interface>
      <InterfaceName>Gendarme.Framework.ITypeRule</InterfaceName>
    </Interface>
  </Interfaces>
  <Attributes>
    <Attribute>
      <AttributeName>Gendarme.Framework.FxCopCompatibility("Microsoft.Design", "CA1027:MarkEnumsWithFlags")</AttributeName>
    </Attribute>
    <Attribute>
      <AttributeName>Gendarme.Framework.Problem("The enum seems to be composed of flag values, but is not decorated with [Flags].")</AttributeName>
    </Attribute>
    <Attribute>
      <AttributeName>Gendarme.Framework.Solution("Add [Flags] to the enum,  change the values so that they are not powers of two, or ignore the defect.")</AttributeName>
    </Attribute>
  </Attributes>
  <Docs>
    <summary>
            This rule will fire if an enum's values look like they are intended to
            be composed together with the bitwise OR operator and the enum is not
            decorated with <c>System.FlagsAttribute</c>. Using <c>FlagsAttribute</c> will
            allow <c>System.Enum.ToString()</c> to return a better string when
            values are ORed together and helps indicate to readers of the code
            the intended usage of the enum.
            </summary>
    <remarks>This rule is available since Gendarme 2.6</remarks>
    <example>
            Bad example:
            <code>
            [Serializable]
            enum Options {
            		First = 1,
            		Second = 2,
            		Third = 4,
            		All = First | Second | Third,
            }
            </code></example>
    <example>
            Good example:
            <code>
            [Flags]
            [Serializable]
            enum Options {
            		First = 1,
            		Second = 2,
            		Third = 4,
            		All = First | Second | Third,
            }
            </code></example>
  </Docs>
  <Members>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public UseFlagsAttributeRule ();" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" />
      <MemberType>Constructor</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.11.0.0</AssemblyVersion>
      </AssemblyInfo>
      <Parameters />
      <Docs>
        <summary>To be added.</summary>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName="CheckType">
      <MemberSignature Language="C#" Value="public Gendarme.Framework.RuleResult CheckType (Mono.Cecil.TypeDefinition type);" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance valuetype Gendarme.Framework.RuleResult CheckType(class Mono.Cecil.TypeDefinition type) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.11.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>Gendarme.Framework.RuleResult</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="type" Type="Mono.Cecil.TypeDefinition" />
      </Parameters>
      <Docs>
        <param name="type">To be added.</param>
        <summary>To be added.</summary>
        <returns>To be added.</returns>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
  </Members>
</Type>
