﻿<?xml version="1.0" encoding="utf-8"?><Type Name="MarkAllNonSerializableFieldsRule" FullName="Gendarme.Rules.Serialization.MarkAllNonSerializableFieldsRule"><TypeSignature Language="C#" Value="public class MarkAllNonSerializableFieldsRule : Gendarme.Framework.Rule, Gendarme.Framework.ITypeRule" /><TypeSignature Language="ILAsm" Value=".class public auto ansi beforefieldinit MarkAllNonSerializableFieldsRule extends Gendarme.Framework.Rule implements class Gendarme.Framework.IRule, class Gendarme.Framework.ITypeRule" /><AssemblyInfo><AssemblyName>Gendarme.Rules.Serialization</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.Usage", "CA2235:MarkAllNonSerializableFields")</AttributeName></Attribute><Attribute><AttributeName>Gendarme.Framework.Problem("This type is Serializable, but contains fields that aren't serializable which can cause runtime errors when instances are serialized.")</AttributeName></Attribute><Attribute><AttributeName>Gendarme.Framework.Solution("Make sure you are marking all non-serializable fields with the NonSerialized attribute or implement custom serialization.")</AttributeName></Attribute></Attributes><Docs><summary>
            This rule checks for serializable types, i.e. decorated with the <c>[Serializable]</c>
            attribute, and checks to see if all its fields are serializable as well. If not the rule will
            fire unless the field is decorated with the <c>[NonSerialized]</c> attribute.
            The rule will also warn if the field type is an interface as it is not possible,
            before execution time, to know for certain if the type can be serialized or not.
            </summary><remarks>This rule is available since Gendarme 2.0</remarks><example>
            Bad example:
            <code>
            class NonSerializableClass {
            }
            [Serializable]
            class SerializableClass {
            	NonSerializableClass field;
            }
            </code></example><example>
            Good example:
            <code>
            class NonSerializableClass {
            }
            [Serializable]
            class SerializableClass {
            	[NonSerialized]
            	NonSerializableClass field;
            }
            </code></example></Docs><Members><Member MemberName=".ctor"><MemberSignature Language="C#" Value="public MarkAllNonSerializableFieldsRule ();" /><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>