Share via


XmlSchemaService.GetKnownSchemas Method ()

 

Returns a list of the schema files.

Namespace:   Microsoft.VisualStudio.XmlEditor
Assembly:  Microsoft.VisualStudio.XmlEditor (in Microsoft.VisualStudio.XmlEditor.dll)

Syntax

public abstract IList<XmlSchemaReference> GetKnownSchemas()
public:
virtual IList<XmlSchemaReference^>^ GetKnownSchemas() abstract
abstract GetKnownSchemas : unit -> IList<XmlSchemaReference>
Public MustOverride Function GetKnownSchemas As IList(Of XmlSchemaReference)

Return Value

Type: System.Collections.Generic.IList<XmlSchemaReference>

The list of XmlSchemaReference objects. See the Remarks section, below, for more information.

Remarks

This XML schema service monitors a number of well-known locations, looking for files that contain valid schemas.

The following locations are monitored:

  • Files in the schema directory and the LCID sub-directory.

  • Files in the current Visual Studio solution that have .xml and .xsd extentions.

  • Catalog files in the schema directory, the LCID sub-directory, and the current Visual Studio solution.

The resulting XmlSchemaReference objects will always have non-null TargetNamespace and Location properties.

The GetKnownSchemas method typically ensures that the locations returned reflect the most recent state of the schema files. However, out of date information might be returned when determining whether a file has recently been updated causes a significant performance impact.

The object identity and order of the locations returned by the GetKnownSchemas method will be the same across multiple calls, as long as the list is exactly the same (that is, the same locations with identical content). This allows callers to detect whether the set is the same as it was the last time they asked for it.

See Also

GetKnownSchemas Overload
XmlSchemaService Class
Microsoft.VisualStudio.XmlEditor Namespace

Return to top