﻿<?xml version="1.0" encoding="utf-8"?><Type Name="AddMissingTypeInheritanceDemandRule" FullName="Gendarme.Rules.Security.Cas.AddMissingTypeInheritanceDemandRule"><TypeSignature Language="C#" Value="public class AddMissingTypeInheritanceDemandRule : Gendarme.Framework.Rule, Gendarme.Framework.ITypeRule" /><TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit AddMissingTypeInheritanceDemandRule extends Gendarme.Framework.Rule implements class Gendarme.Framework.IRule, class Gendarme.Framework.ITypeRule" /><AssemblyInfo><AssemblyName>Gendarme.Rules.Security.Cas</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.Security", "CA2126:TypeLinkDemandsRequireInheritanceDemands")</AttributeName></Attribute><Attribute><AttributeName>Gendarme.Framework.Problem("The type isn't sealed and has a LinkDemand. It should also have an InheritanceDemand for the same permissions.")</AttributeName></Attribute><Attribute><AttributeName>Gendarme.Framework.Solution("Add an InheritanceDemand for the same permissions (as the LinkDemand) or seal the class.")</AttributeName></Attribute></Attributes><Docs><summary>
             The rule checks for types that are not <c>sealed</c> but have a <c>LinkDemand</c>.
             In this case the type should also have an <c>InheritanceDemand</c> for the same 
             permissions. An alternative is to seal the type.
             </summary><remarks>Before Gendarme 2.2 this rule was part of Gendarme.Rules.Security and named TypeLinkDemandRule.</remarks><example>
             Bad example:
             <code>
             [SecurityPermission (SecurityAction.LinkDemand, ControlThread = true)]
             public class Bad {
             }
             </code></example><example>
             Good example (InheritanceDemand):
             <code>
             [SecurityPermission (SecurityAction.LinkDemand, ControlThread = true)]
             [SecurityPermission (SecurityAction.InheritanceDemand, ControlThread = true)]
             public class Correct {
             }
             </code></example><example>
             Good example (sealed):
             <code>
             [SecurityPermission (SecurityAction.LinkDemand, ControlThread = true)]
             public sealed class Correct {
             }
             </code></example></Docs><Members><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public AddMissingTypeInheritanceDemandRule ();" /><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>