Method FetchClassificationSchemaAsync
FetchClassificationSchemaAsync(CancellationToken)
Fetches the ClassificationSchema when HasClassificationSchema is true.
Declaration
public Task<ClassificationSchema> FetchClassificationSchemaAsync(CancellationToken cancellationToken = default)
Parameters
| Type | Name | Description |
|---|---|---|
| CancellationToken | cancellationToken | A cancellation token that can be used to cancel the operation. |
Returns
| Type | Description |
|---|---|
| Task<ClassificationSchema> | The ClassificationSchema if enabled by the organization administrator. |
Remarks
Returns the ClassificationSchema if the organization administrator has enabled it. The schema supplies classification metadata needed to correctly display item classification markings and banners (including colors and text) derived from the organization's primary classification attribute. If the portal is not already loaded, it will be loaded automatically.
caution
This method will throw an InvalidOperationException if HasClassificationSchema is false.
Exceptions
| Type | Condition |
|---|---|
| InvalidOperationException | Thrown if the portal does not have a classification schema enabled. |
See Also
Applies to
Platforms and versions
| Target | Versions |
|---|---|
| .NET | 300 |
| .NET Windows | 300 |
| .NET Android | 300 |
| .NET iOS | 300 |