NativeSubscriptionManagerSubscriptionActivateDeactivate Method Content Studio 5.7 SDK
Content Studio Web Content Management System

[This is preliminary documentation and is subject to change.]

Activates or deactivates a subscription.

Namespace: ContentStudio.Document.Subscription
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax

public void SubscriptionActivateDeactivate(
	ConnectionId connectionId,
	SessionId sessionId,
	string key,
	bool activate
)

Parameters

connectionId
Type: ContentStudioConnectionId
A value that identifies the web site
sessionId
Type: ContentStudio.SecuritySessionId
A value that identifies the user's session. This value usually originates from a call to OpenSession(ConnectionId). Currently this value is not used by Content Studio; the value 1 (Anonymous session id) is valid.
key
Type: SystemString
The activation key that is needed when activating or deactivating.

This parameter is the same as the subscription identifier which is a Guid. However this value must be in the format 32 contiguous digits: dddddddddddddddddddddddddddddddd and Content Studio must be able to create this guid from the key.

activate
Type: SystemBoolean
When set to true the subscription will be activated; otherwise, deactivated. You cannot activate an already activated subscription and you cannot deactivate an already deactivated subscription.
Exceptions

ExceptionCondition
CSDocumentNotFoundExceptionThe key does not exist.
ArgumentNullExceptionkey cannot be null
ArgumentOutOfRangeExceptionThe key is in the wrong format.
FormatExceptionThe key is in the wrong format.
OverflowExceptionThe key is in the wrong format.
InvalidOperationExceptionThe subscription is already activated or the subscription is already deactivated.
SqlExceptionAn error occurred when executing the command against the Content Studio database
Content Studio permissions

This method can be successfully executed by anyone that has access to the key.
Remarks

When a subscription is created it is added to the database but not activated, instead it must be activated before any subscription handler will use it.
Note Note
This method is new in Content Studio 5.2
See Also

Reference