skipcheck

TM1 client · Docs · Versions and capabilities

Tm1Capabilities

using Skipcheck.Tm1.Client.Version;

What a connected TM1 server supports, read from its own $metadata: the way OData intends clients to detect features, with no version tables. It works for any TM1, including versions the client has never seen.

// Does the server's $metadata define the cube's tm1.Reserve action?
var reserve = Tm1Capability.BoundOperation("tm1.Cube", "tm1.Reserve").Since("11.8.34");
return (await session.CapabilitiesAsync()).Supports(reserve);

Members

SchemaVersion propertyThe REST API schema version the server reports in Core.SchemaVersion, such as 11.8.35, or null if it reports none.
ProductVersion propertyThe server's product version, such as 11.8.03500.6, or null if not known.
Endpoints propertyThe endpoints, as coverage-gate IDs.
Parse staticReads a $metadata document.
WithProductVersionA copy that knows the server's product version.
SupportsWhether the server's $metadata defines capability.
CheckNull if the server has it; otherwise the error saying what's missing, as Java's.
ToString

SchemaVersion

property
string? SchemaVersion

The REST API schema version the server reports in Core.SchemaVersion, such as 11.8.35, or null if it reports none. Not the product version: a different number.

ProductVersion

property
Tm1Version? ProductVersion

The server's product version, such as 11.8.03500.6, or null if not known.

Endpoints

property
IReadOnlySet<string> Endpoints

The endpoints, as coverage-gate IDs.

Parse

static
Tm1Capabilities Parse(string metadata, Tm1Version? productVersion = null)

Reads a $metadata document. One with a DOCTYPE is refused, which rules out external entities and entity expansion entirely.

Throws

Tm1ProtocolException
The document isn't XML, isn't CSDL, or is CSDL this client can't make a model of, such as a bound operation with no parameter to bind. Every failure to read it is this exception, never one of .NET's own.

WithProductVersion

Tm1Capabilities WithProductVersion(Tm1Version? productVersion)

A copy that knows the server's product version.

Supports

bool Supports(Tm1Capability capability)

Whether the server's $metadata defines capability.

Check

Tm1UnsupportedOperationException? Check(Tm1Capability capability, string server)

Null if the server has it; otherwise the error saying what's missing, as Java's.

ToString

string ToString()