Inheritance Hierarchy
DeltaEngine.Content.Xml ContentTypeIdentifier
Namespace: DeltaEngine.Content.Xml
Assembly: DeltaEngine.Content.Xml (in DeltaEngine.Content.Xml.dll) Version: 1.1.1.0 (1.1.1)
Syntax
The ContentTypeIdentifier type exposes the following members.
Constructors
Name | Description | |
---|---|---|
ContentTypeIdentifier | Initializes a new instance of the ContentTypeIdentifier class |
Methods
Name | Description | |
---|---|---|
DetermineTypeForXmlFile | ||
ExtensionToType | ||
IsUncompressedFile |
Remarks
Examples
[Test] public void ContentTypeOfUndefinedRootElementsIsXml() { string xmlData = CreateXmlDataFromTag("Test"); ContentType type = GetContentTypeOfXmlData(xmlData); Assert.AreEqual(ContentType.Xml, type); }
[Test] public void ThrowExceptionIfInvalidXmlData() { const string InvalidXmlData = "<Opening></Closing>"; Assert.Throws<XmlException>(() => GetContentTypeOfXmlData(InvalidXmlData)); }
[Test] public void UnsupportedTypeLogsAndThrowsExceptionInDebug() { Assert.Throws<ContentTypeIdentifier.UnsupportedContentFileFoundCannotParseType>( () => ContentTypeIdentifier.ExtensionToType(UnsupportedFileName)); }
See Also