System.Xml.Serialization.XmlReflectionImporter.CheckNullable C# (CSharp) 메소드

CheckNullable() 개인적인 정적인 메소드

private static CheckNullable ( bool isNullable, TypeDesc typeDesc, TypeMapping mapping ) : void
isNullable bool
typeDesc TypeDesc
mapping TypeMapping
리턴 void
        private static void CheckNullable(bool isNullable, TypeDesc typeDesc, TypeMapping mapping)
        {
            if (mapping is NullableMapping) return;
            if (mapping is SerializableMapping) return;
            if (isNullable && !typeDesc.IsNullable) throw new InvalidOperationException(SR.Format(SR.XmlInvalidIsNullable, typeDesc.FullName));
        }