<Type Name="UseCorrectSignatureForSerializationMethodsRule" FullName="Gendarme.Rules.Serialization.UseCorrectSignatureForSerializationMethodsRule">
  <TypeSignature Language="C#" Value="public class UseCorrectSignatureForSerializationMethodsRule : Gendarme.Framework.Rule, Gendarme.Framework.IMethodRule" />
  <TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit UseCorrectSignatureForSerializationMethodsRule extends Gendarme.Framework.Rule implements class Gendarme.Framework.IMethodRule, class Gendarme.Framework.IRule" />
  <AssemblyInfo>
    <AssemblyName>Gendarme.Rules.Serialization</AssemblyName>
    <AssemblyVersion>2.11.0.0</AssemblyVersion>
  </AssemblyInfo>
  <Base>
    <BaseTypeName>Gendarme.Framework.Rule</BaseTypeName>
  </Base>
  <Interfaces>
    <Interface>
      <InterfaceName>Gendarme.Framework.IMethodRule</InterfaceName>
    </Interface>
  </Interfaces>
  <Attributes>
    <Attribute>
      <AttributeName>Gendarme.Framework.FxCopCompatibility("Microsoft.Usage", "CA2238:ImplementSerializationMethodsCorrectly")</AttributeName>
    </Attribute>
    <Attribute>
      <AttributeName>Gendarme.Framework.Problem("The method has the wrong signature, it should return System.Void and have a single parameter of type 'System.Runtime.Serialization.StreamingContext' and be private.")</AttributeName>
    </Attribute>
    <Attribute>
      <AttributeName>Gendarme.Framework.Solution("Fix the method signature to match the runtime requirements.")</AttributeName>
    </Attribute>
  </Attributes>
  <Docs>
    <summary>
            This rule checks for methods which use the serialization attributes:
            <c>[OnSerializing, OnDeserializing, OnSerialized, OnDeserialized]</c>. You must
            ensure that these methods have the correct signature. They should be <c>private</c>,
            return <c>void</c> and have a single parameter of type <c>StreamingContext</c>.
            Failure to have the right signature can, in some circumstances, make your assembly
            unusable at runtime.
            </summary>
    <remarks>This rule is available since Gendarme 2.0</remarks>
    <example>
            Bad example:
            <code>
            [Serializable]
            public class Bad {
            	[OnSerializing]
            	public bool Serializing (StreamingContext context)
            	{
            	}
            }
            </code></example>
    <example>
            Good example:
            <code>
            [Serializable]
            public class BadClass {
            	[OnSerializing]
            	private void Serializing (StreamingContext context)
            	{
            	}
            }
            </code></example>
  </Docs>
  <Members>
    <Member MemberName=".ctor">
      <MemberSignature Language="C#" Value="public UseCorrectSignatureForSerializationMethodsRule ();" />
      <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="CheckMethod">
      <MemberSignature Language="C#" Value="public Gendarme.Framework.RuleResult CheckMethod (Mono.Cecil.MethodDefinition method);" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance valuetype Gendarme.Framework.RuleResult CheckMethod(class Mono.Cecil.MethodDefinition method) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.11.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>Gendarme.Framework.RuleResult</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="method" Type="Mono.Cecil.MethodDefinition" />
      </Parameters>
      <Docs>
        <param name="method">To be added.</param>
        <summary>To be added.</summary>
        <returns>To be added.</returns>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
    <Member MemberName="Initialize">
      <MemberSignature Language="C#" Value="public override void Initialize (Gendarme.Framework.IRunner runner);" />
      <MemberSignature Language="ILAsm" Value=".method public hidebysig virtual instance void Initialize(class Gendarme.Framework.IRunner runner) cil managed" />
      <MemberType>Method</MemberType>
      <AssemblyInfo>
        <AssemblyVersion>2.11.0.0</AssemblyVersion>
      </AssemblyInfo>
      <ReturnValue>
        <ReturnType>System.Void</ReturnType>
      </ReturnValue>
      <Parameters>
        <Parameter Name="runner" Type="Gendarme.Framework.IRunner" />
      </Parameters>
      <Docs>
        <param name="runner">To be added.</param>
        <summary>To be added.</summary>
        <remarks>To be added.</remarks>
      </Docs>
    </Member>
  </Members>
</Type>
