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 property | The REST API schema version the server reports in Core.SchemaVersion, such as 11.8.35, or null if it reports none. |
ProductVersion property | The server's product version, such as 11.8.03500.6, or null if not known. |
Endpoints property | The endpoints, as coverage-gate IDs. |
Parse static | Reads a $metadata document. |
WithProductVersion | A copy that knows the server's product version. |
Supports | Whether the server's $metadata defines capability. |
Check | Null if the server has it; otherwise the error saying what's missing, as Java's. |
ToString |
SchemaVersion
propertystring? SchemaVersionThe 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
propertyTm1Version? ProductVersionThe server's product version, such as 11.8.03500.6, or null if not
known.
Endpoints
propertyIReadOnlySet<string> EndpointsThe endpoints, as coverage-gate IDs.
Parse
staticTm1Capabilities 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()