﻿<?xml version="1.0" encoding="utf-8"?><Type Name="AvoidUninstantiatedInternalClassesRule" FullName="Gendarme.Rules.Performance.AvoidUninstantiatedInternalClassesRule"><TypeSignature Language="C#" Value="public class AvoidUninstantiatedInternalClassesRule : Gendarme.Framework.Rule, Gendarme.Framework.ITypeRule" /><TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit AvoidUninstantiatedInternalClassesRule extends Gendarme.Framework.Rule implements class Gendarme.Framework.IRule, class Gendarme.Framework.ITypeRule" /><AssemblyInfo><AssemblyName>Gendarme.Rules.Performance</AssemblyName><AssemblyVersion>3.10.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.Performance", "CA1812:AvoidUninstantiatedInternalClasses")</AttributeName></Attribute><Attribute><AttributeName>Gendarme.Framework.Problem("The internal type is not instantiated by code within the assembly.")</AttributeName></Attribute><Attribute><AttributeName>Gendarme.Framework.Solution("Remove the type or add the code that uses it. If the type contains only static methods then either add the static modifier to the type or add the private construtor to the type to prevent the compiler from emitting a default public instance constructor.")</AttributeName></Attribute></Attributes><Docs><summary>
            This rule will fire if a type is only visible within its assembly, can be instantiated, but
            is not instantiated. Such types are often leftover (dead code) or are debugging/testing
            code and not required. However in some case the types might by needed, e.g. when
            accessed thru reflection or if the <c>[InternalsVisibleTo]</c> attribute is used on the
            assembly.
            </summary><remarks>To be added.</remarks><example>
            Bad example:
            <code>
            // defined, but never instantiated
            internal class MyInternalClass {
            	// ...
            }
            public class MyClass {
            	static void Main ()
            	{
            		// ...
            	}
            }
            </code></example><example>
            Good example:
            <code>
            internal class MyInternalClass {
            	// ...
            }
            public class MyClass {
            	static void Main ()
            	{
            		MyInternalClass c = new MyInternalClass ();
            		// ...
            	}
            }
            </code></example></Docs><Members><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public AvoidUninstantiatedInternalClassesRule ();" /><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="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>3.10.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>