Content Studio Web Content Management System
SystemObject
System.Collections.ObjectModelReadOnlyCollectionSubscription
ContentStudio.Document.SubscriptionSubscriptionCollection
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Top
Top
Top
[This is preliminary documentation and is subject to change.]
This class defines a collection data reader that reads subscriptions
connected to a subscription definition.
This data reader supports paging functionality.
Inheritance Hierarchy
System.Collections.ObjectModelReadOnlyCollectionSubscription
ContentStudio.Document.SubscriptionSubscriptionCollection
Namespace: ContentStudio.Document.Subscription
Assembly: CSServer5 (in CSServer5.dll) Version: 5.7.5016.0 (5.7.5016.0)
Syntax
The SubscriptionCollection type exposes the following members.
Properties
Name | Description | |
---|---|---|
ActivatedOnly |
Gets or sets a value indicating whether to return only activated subscriptions.
If this property is true and the subscription is not activated on the category
no subscribers are returned.
| |
Count | (Inherited from ReadOnlyCollectionSubscription.) | |
Enabled |
Gets a value indicating whether the subscription definition, whose subscriptions are being read, is enabled.
| |
Item | (Inherited from ReadOnlyCollectionSubscription.) | |
PageNumber |
Gets a value that identifies which page of results found. 1 identifies the first page.
| |
PageSize |
Gets a value that identifies the maximum number of objects that can be returned on a data page.
| |
SortOrder |
Gets or sets the sort order or the subscriptions.
| |
TotalItems |
Gets the total number of items found.
| |
TotalPages |
Gets the total number of data pages.
|
Methods
Name | Description | |
---|---|---|
Contains | (Inherited from ReadOnlyCollectionSubscription.) | |
CopyTo | (Inherited from ReadOnlyCollectionSubscription.) | |
Create |
Creates SubscriptionCollection that can be used to read through the collection
of subscribers on a specific SubscriptionDefinition.
| |
Equals | (Inherited from Object.) | |
GetEnumerator | (Inherited from ReadOnlyCollectionSubscription.) | |
GetHashCode | (Inherited from Object.) | |
GetType | (Inherited from Object.) | |
IndexOf | (Inherited from ReadOnlyCollectionSubscription.) | |
Read |
Reads the next data page in a paged data list.
| |
ReadPage |
Reads data located on a specific data page.
| |
ToString | (Inherited from Object.) |
Fields
Name | Description | |
---|---|---|
DefaultPageSize |
Defines the default data page size used by this collection. This value is constant and is 10.
|
Examples
The following small sample shows how to use the paged data reading collection of subscriptions to return all subscriptions of a specific type on the current category and write them to a regular Html-table. This code only works on a Content Studio document and exception handling is omitted.
SubscriptionDefinition supo = new SubscriptionDefinition(CS_ConnectionId, CS_UserSession, CS_InsertedCategoryId, SubscriptionType.Newsletter); //Get all subscribers SubscriptionCollection subscriptions = supo.Subscriptions; if (subscriptions != null) { subscriptions.PageSize = 10; subscriptions.SortOrder = SubscriptionSorting.None; Response.Write("<table>\r\n"); Response.Write(" <tr><th>Name</th><th>Address</th><th>Identifier</th></tr>\r\n"); while (subscriptions.Read()) { foreach(Subscription s in subscriptions) { Response.Write(" <tr>\r\n"); Response.Write(String.Format(" <td>{0}</td><td>{1}</td><td>{2}</td>\r\n", s.Name, s.Address.Address, s.ID.ToString())); Response.Write(" </tr>\r\n"); } } Response.Write("</table>"); }
See Also