﻿<?xml version="1.0" encoding="utf-8"?><Type Name="ReviewSealedTypeWithInheritanceDemandRule" FullName="Gendarme.Rules.Security.Cas.ReviewSealedTypeWithInheritanceDemandRule"><TypeSignature Language="C#" Value="public class ReviewSealedTypeWithInheritanceDemandRule : Gendarme.Framework.Rule, Gendarme.Framework.ITypeRule" /><TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit ReviewSealedTypeWithInheritanceDemandRule 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.Problem("This sealed type has an InheritanceDemand that the runtime will never execute.")</AttributeName></Attribute><Attribute><AttributeName>Gendarme.Framework.Solution("Review the InheritanceDemand on this type and either remove it or change its SecurityAction to, probably, a LinkDemand.")</AttributeName></Attribute></Attributes><Docs><summary>
            This rule checks for sealed types that have <c>InheritanceDemand</c> declarative
            security applied to them. Since those types cannot be inherited from the
            <c>InheritanceDemand</c> will never be executed by the runtime. Check if the permission
            is required and, if so, change the <c>SecurityAction</c> to the correct one. Otherwise
            remove the permission.
            </summary><remarks>Before Gendarme 2.2 this rule was part of Gendarme.Rules.Security and named SealedTypeWithInheritanceDemandRule.</remarks><example>
            Bad example:
            <code>
            [SecurityPermission (SecurityAction.InheritanceDemand, Unrestricted = true)]
            public sealed class Bad {
            }
            </code></example><example>
            Good example (non sealed):
            <code>
            [SecurityPermission (SecurityAction.InheritanceDemand, Unrestricted = true)]
            public class Good {
            }
            </code></example><example>
            Good example (LinkDemand):
            <code>
            [SecurityPermission (SecurityAction.LinkDemand, Unrestricted = true)]
            public sealed class Good {
            }
            </code></example></Docs><Members><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public ReviewSealedTypeWithInheritanceDemandRule ();" /><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>