PhoenixmlDb.Core
ISchemaAccessGate
The one route by which a schema document that the host did not supply is read: a root schema named by URI, and every document reached from any schema by xs:include, xs:import or xs:redefine.
#ISchemaAccessGate
Namespace: PhoenixmlDb.Core.Schema
The one route by which a schema document that the host did not supply is read: a root schema named by URI, and every document reached from any schema by
xs:include
,
xs:import
or
xs:redefine
.
Nothing in the layer opens a file or a connection itself. Whatever a host's rules are — a resource policy, an allow list, a database's access policy, a server's settings — they are enforced here, in one place, for the whole closure of a schema and not only for its root.
A SchemaSource registered for a URI is served without asking the gate: the host supplied that content, so there is nothing to fetch.
For one compilation each document is opened at most once, so a gate may count what it opens against a budget. An exception a gate throws reaches the caller of the compilation unchanged.
#Properties
| Name | Description |
|---|---|
Identity
|
Names the rules this gate applies, to keep the compiled schemas of differently configured gates apart in a cache. It is not what protects a document: a cached schema is given to a request only after that request's own gate has answered ISchemaAccessGate.GetVersionAsync for every document in it.
|
#Methods
#GetVersionAsync(PhoenixmlDb.Core.Schema.SchemaDocumentRequest,Threading.CancellationToken)
The current version token of the document, without its content: what
would give as
now.
Returns: The token, or null when the gate does not admit the document or it does not exist.
#OpenAsync(PhoenixmlDb.Core.Schema.SchemaDocumentRequest,Threading.CancellationToken)
Opens the document, or refuses it.
Returns: The document, or null when the gate does not admit it or it does not exist. The two are reported alike, so a refusal does not reveal whether the document is there.