<Type Name="FinalizersShouldCallBaseClassFinalizerRule" FullName="Gendarme.Rules.Correctness.FinalizersShouldCallBaseClassFinalizerRule">
  <TypeSignature Language="C#" Value="public class FinalizersShouldCallBaseClassFinalizerRule : Gendarme.Framework.Rule, Gendarme.Framework.ITypeRule" />
  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit FinalizersShouldCallBaseClassFinalizerRule extends Gendarme.Framework.Rule implements class Gendarme.Framework.IRule, class Gendarme.Framework.ITypeRule" />
  <AssemblyInfo>
    <AssemblyName>Gendarme.Rules.Correctness</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.EngineDependency(typeof(Gendarme.Framework.Engines.OpCodeEngine))</AttributeName>
    </Attribute>
    <Attribute>
      <AttributeName>Gendarme.Framework.FxCopCompatibility("Microsoft.Usage", "CA2220:FinalizersShouldCallBaseClassFinalizer")</AttributeName>
    </Attribute>
    <Attribute>
      <AttributeName>Gendarme.Framework.Problem("The finalizer for this type does not call the base class finalizer.")</AttributeName>
    </Attribute>
    <Attribute>
      <AttributeName>Gendarme.Framework.Solution("Since your language does not do this automatically, like C#, add a call to the base type finalizer just before the finalizer exits.")</AttributeName>
    </Attribute>
  </Attributes>
  <Docs>
    <summary>
            This rule is used to warn the developer that a finalizer does not call the base class
            finalizer. In C#, this is enforced by compiler but some .NET languages (like IL)
            may allow such behavior.
            </summary>
    <remarks>To be added.</remarks>
    <example>
            Bad example (IL):
            <code>
            .assembly extern mscorlib
            {
            	.ver 1:0:5000:0
            	.publickeytoken = (B7 7A 5C 56 19 34 E0 89 )
            }
            .class public auto ansi beforefieldinit BadFinalizer extends [mscorlib]System.Object
            {
            	.method family virtual hidebysig instance void Finalize() cil managed
            	{
            		// no base call so rule will fire here
            	}
            }
            </code></example>
    <example>
            Good example (C#):
            <code>
            public class GoodFinalizer {
            	~GoodFinalizer ()
            	{
            		// C# compiler will insert base.Finalize () call here
            		// so any compiler-generated code will be valid
            	}
            }
            </code></example>
  </Docs>
  <Members>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public FinalizersShouldCallBaseClassFinalizerRule ();" />
      <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>
