Share via


XmlSchemaService.GetKnownSchemas Method (Guid)

 

Returns a list of all the schema files that have been discovered in the specified location.

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

Syntax

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

Parameters

  • locationId
    Type: System.Guid

    The GUID of a Visual Studio project or of the schema cache.

Return Value

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

A list of all the schema files that have been discovered in the specified location.

Remarks

Returns the subset of known schemas that are directly or indirectly contained within the specified location, identified by a GUID. The GUID can identify either a Visual Studio project or the schema cache. The files returned have either been directly obtained from the location or indirectly obtained through a catalog file.

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