System.Runtime.Serialization.XsdDataContractImporter.GetTypeInfo C# (CSharp) Method

GetTypeInfo() private method

private GetTypeInfo ( XmlQualifiedName typeName, bool throwError ) : TypeImportInfo
typeName System.Xml.XmlQualifiedName
throwError bool
return TypeImportInfo
		TypeImportInfo GetTypeInfo (XmlQualifiedName typeName, bool throwError)
		{
			var info = imported_types.FirstOrDefault (i => i.XsdTypeName.Equals (typeName));
			if (info == null) {
				if (throwError)
					throw new InvalidOperationException (String.Format ("schema type '{0}' has not been imported yet. Import it first.", typeName));
				return null;
			}
			return info;
		}