﻿<?xml version="1.0" encoding="utf-8"?><Type Name="PreferIFormatProviderOverrideRule" FullName="Gendarme.Rules.Globalization.PreferIFormatProviderOverrideRule"><TypeSignature Language="C#" Value="public class PreferIFormatProviderOverrideRule : Gendarme.Rules.Globalization.PreferOverrideBaseRule" /><TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit PreferIFormatProviderOverrideRule extends Gendarme.Rules.Globalization.PreferOverrideBaseRule" /><AssemblyInfo><AssemblyName>Gendarme.Rules.Globalization</AssemblyName><AssemblyVersion>3.10.0.0</AssemblyVersion></AssemblyInfo><Base><BaseTypeName>Gendarme.Rules.Globalization.PreferOverrideBaseRule</BaseTypeName></Base><Interfaces /><Attributes><Attribute><AttributeName>Gendarme.Framework.FxCopCompatibility("Microsoft.Globalization", "CA1304:SpecifyCultureInfo")</AttributeName></Attribute><Attribute><AttributeName>Gendarme.Framework.FxCopCompatibility("Microsoft.Globalization", "CA1305:SpecifyIFormatProvider")</AttributeName></Attribute><Attribute><AttributeName>Gendarme.Framework.Problem("A call is made to a method for which an override, accepting an extra IFormatProvider or CultureInfo, is available")</AttributeName></Attribute><Attribute><AttributeName>Gendarme.Framework.Solution("Specify how the string should be compared by adding the right IFormatProvider/CultureInfo value to the call")</AttributeName></Attribute></Attributes><Docs><summary>
            This rule detects calls to method that could be changed to call an <c>override</c> accepting an
            extra <c>System.IFormatProvider</c> or <c>System.Globalization.CultureInfo</c> parameter (the
            later implements <c>System.IFormatProvider</c>).
            Generally data displayed to the end user should be using
            <c>System.Globalization.CultureInfo.CurrentCulture</c> while other data (e.g. used internally,
            stored in files/databases) should use <c>System.Globalization.CultureInfo.InvariantCulture</c>.
            The rule will ignore the following special methods:
            <list><item><c>System.Activator.CreateInstance</c></item><item><c>System.Resources.ResourceManager.GetObject</c></item><item><c>System.Resources.ResourceManager.GetString</c></item></list></summary><remarks>To be added.</remarks><example>
            Bad example:
            <code>
            public bool Confirm (double amount)
            {
            	string msg = String.Format ("Accept payment of {0} ?", amount);
            	Transaction.Log ("{0} {1}", DateTime.Now, amount);
            	return Prompt (msg);
            }
            </code></example><example>
            Good example:
            <code>
            public bool Confirm (double amount)
            {
            	string msg = String.Format (CultureInfo.CurrentCulture, "Accept payment of {0} ?", amount);
            	Transaction.Log (CultureInfo.InvariantCulture, "{0} {1}", DateTime.Now, amount);
            	return Prompt (msg);
            }
            </code></example></Docs><Members><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public PreferIFormatProviderOverrideRule ();" /><MemberSignature Language="ILAsm" Value=".method public hidebysig specialname rtspecialname instance void .ctor() cil managed" /><MemberType>Constructor</MemberType><AssemblyInfo><AssemblyVersion>3.10.0.0</AssemblyVersion></AssemblyInfo><Parameters /><Docs><summary>To be added.</summary><remarks>To be added.</remarks></Docs></Member><Member MemberName="CheckFirstParameter"><MemberSignature Language="C#" Value="protected override bool CheckFirstParameter { get; }" /><MemberSignature Language="ILAsm" Value=".property instance bool CheckFirstParameter" /><MemberType>Property</MemberType><AssemblyInfo><AssemblyVersion>3.10.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Boolean</ReturnType></ReturnValue><Docs><summary>To be added.</summary><value>To be added.</value><remarks>To be added.</remarks></Docs></Member><Member MemberName="IsPrefered"><MemberSignature Language="C#" Value="protected override bool IsPrefered (Mono.Cecil.TypeReference type);" /><MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance bool IsPrefered(class Mono.Cecil.TypeReference type) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>3.10.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Boolean</ReturnType></ReturnValue><Parameters><Parameter Name="type" Type="Mono.Cecil.TypeReference" /></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><Member MemberName="IsSpecialCase"><MemberSignature Language="C#" Value="protected override bool IsSpecialCase (Mono.Cecil.MethodReference method);" /><MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance bool IsSpecialCase(class Mono.Cecil.MethodReference method) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>3.10.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Boolean</ReturnType></ReturnValue><Parameters><Parameter Name="method" Type="Mono.Cecil.MethodReference" /></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="Report"><MemberSignature Language="C#" Value="protected override void Report (Mono.Cecil.MethodDefinition method, Mono.Cecil.Cil.Instruction instruction, Mono.Cecil.MethodReference prefered);" /><MemberSignature Language="ILAsm" Value=".method familyhidebysig virtual instance void Report(class Mono.Cecil.MethodDefinition method, class Mono.Cecil.Cil.Instruction instruction, class Mono.Cecil.MethodReference prefered) cil managed" /><MemberType>Method</MemberType><AssemblyInfo><AssemblyVersion>3.10.0.0</AssemblyVersion></AssemblyInfo><ReturnValue><ReturnType>System.Void</ReturnType></ReturnValue><Parameters><Parameter Name="method" Type="Mono.Cecil.MethodDefinition" /><Parameter Name="instruction" Type="Mono.Cecil.Cil.Instruction" /><Parameter Name="prefered" Type="Mono.Cecil.MethodReference" /></Parameters><Docs><param name="method">To be added.</param><param name="instruction">To be added.</param><param name="prefered">To be added.</param><summary>To be added.</summary><remarks>To be added.</remarks></Docs></Member></Members></Type>