[This is preliminary documentation and is subject to change.]
Namespace: ContentStudio.Document.Subscription
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
public static ReadOnlyCollection<SubscriptionDefinitionListItem> SubscriptionsWithUserData( ConnectionId connectionId, SessionId sessionId, SubscriptionType subscriptionType, string address, SubscriberAddressType addressType, bool includeDisabled )
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 typically is retrieved from a call to the OpenSession method - subscriptionType
- Type: ContentStudio.Document.SubscriptionSubscriptionType
Type of the subscription. - address
- Type: SystemString
The subscriber's address. - addressType
- Type: ContentStudio.Document.SubscriptionSubscriberAddressType
The type of address represented by the parameter. - includeDisabled
- Type: SystemBoolean
Defines whether the list includes disabled subscription definitions where the subscriber still have a subscription.
Return Value
Type: ReadOnlyCollectionSubscriptionDefinitionListItemA ReadOnlyCollectionT of SubscriptionDefinitionListItem object that represents a the subscriptions that the subscriber has subscribed to.
Return Value
Type: ReadOnlyCollectionSubscriptionDefinitionListItemException | Condition |
---|---|
SqlException | An error occurred when executing the command against the Content Studio database |
NotSupportedException | The value of the subscriptionType or addressType is not supported. |
SubscriptionsWithUserData can be used when building a "My existing and possible subscriptions" application. For example a developer might want to display a list of checkboxes that represents all subscribable categories, where the checkboxes are checked for each subscription that the subscriber already subscribes to.
This method combines the result from the SubscriptionsBySubscriber(ConnectionId, SessionId, String, SubscriberAddressType, Boolean) and GetList(ConnectionId, SessionId, SubscriptionType) methods. All found items from SubscriptionsBySubscriber(ConnectionId, SessionId, String, SubscriberAddressType, Boolean) are kept while any duplicates are removed from GetList(ConnectionId, SessionId, SubscriptionType). The documents are joined together and sorted by name.
The returned list of SubscriptionDefinitionListItem objects can represent a subscribable category where a subscriber (represented by the address parameter) has or has not a subscription. If there is a subscription the Subscription property will contain a SubscriptionInfo object with information about the subscription. Otherwise this property will be null (Nothing in Visual Basic).