StreamLink.NET  7.1.5-7.1.5-3946-4e293d0
 All Classes Namespaces Functions Variables Enumerations Enumerator Properties Pages
Public Member Functions | List of all members
Caplin.StreamLink.IContainerSubscriptionParameters Interface Reference

Defines the parameters used for Container subscriptions. To create an instance of ContainerSubscriptionParameters call the IStreamLink.CreateContainerSubscriptionParameters method. More...

Inheritance diagram for Caplin.StreamLink.IContainerSubscriptionParameters:
Caplin.StreamLink.IRecordSubscriptionParameters Caplin.StreamLink.ISubscriptionParameters

Public Member Functions

Caplin.StreamLink.IContainerSubscriptionParameters Select (string where, string orderBy, string groupBy)
 Allow selection, sorting and grouping of containers. More...
 
Caplin.StreamLink.IContainerSubscriptionParameters SetKeepInaccessible ()
 Sets the subscription to keep elements in the container that are inaccessible. More...
 
Caplin.StreamLink.IContainerSubscriptionParameters SetStructureOnly ()
 Sets the subscription to provide only the container structure (no constituent images or updates). More...
 
Caplin.StreamLink.IContainerSubscriptionParameters SetWindow (int start, int size)
 Sets the size of the container window. More...
 

Detailed Description

Defines the parameters used for Container subscriptions. To create an instance of ContainerSubscriptionParameters call the IStreamLink.CreateContainerSubscriptionParameters method.

The ContainerSubscriptionParameters is passed as a parameter to the subscribe method in the IStreamLink.

Member Function Documentation

Caplin.StreamLink.IContainerSubscriptionParameters Caplin.StreamLink.IContainerSubscriptionParameters.Select ( string  where,
string  orderBy,
string  groupBy 
)

Allow selection, sorting and grouping of containers.

  • Example: params.select('bid>123&ask<122', "bid ASC NUMBER, ask DESC NUMBER", "bid" )
  • The static ContainerFilterFactory can be used to build a FilterExpression whose toFilterString method will generate a where clause in the required format.
  • Note: this method will only work if the backend has the Caplin Refiner installed.
  • The following example shows how to build an expression for FIELD1 > 0.1 AND FIELD3 = "a a"
// Build an expression for FIELD1 > 0.1 AND FIELD3 = "a a"
IContainerSubscriptionParameters containerSubscriptionParameters = streamlink.CreateContainerSubscriptionParameters();
IFilterExpression exp1 = ContainerFilterFactory.Create("FIELD1", FilterExpressionOperator.GREATER_THAN, "0.1");
IFilterExpression exp2 = ContainerFilterFactory.Create("FIELD3", FilterExpressionOperator.EQUAL, "a a");
IFilterExpression exp1Andexp2 = ContainerFilterFactory.CreateLogical(FilterExpressionLogicalOperator.AND, exp1, exp2);
containerSubscriptionParameters.Select(exp1Andexp2.ToFilterString(), "FIELD1", null);
ISubscription subscription = streamlink.Subscribe("/container", subscriptionListener, containerSubscriptionParameters);
  • Parameters
    whereThe where clause, in the form required by Caplin Refiner (example 'bid>123&ask<222').
  • Parameters
    orderByThe sorting order of the returned container in the form: field [ASC or DESC] [NUMBER or TEXT], ... example: bid DESC NUMBER,ask ASC NUMBER
  • Parameters
    groupByThe group by clause in the form: field example: bid
  • Returns
    The update ContainerSubscriptionParameters object to permit a fluent programming style.
Caplin.StreamLink.IContainerSubscriptionParameters Caplin.StreamLink.IContainerSubscriptionParameters.SetKeepInaccessible ( )

Sets the subscription to keep elements in the container that are inaccessible.

  • The update ContainerSubscriptionParameters object to permit a fluent programming style.
Caplin.StreamLink.IContainerSubscriptionParameters Caplin.StreamLink.IContainerSubscriptionParameters.SetStructureOnly ( )

Sets the subscription to provide only the container structure (no constituent images or updates).

  • The update ContainerSubscriptionParameters object to permit a fluent programming style.
Caplin.StreamLink.IContainerSubscriptionParameters Caplin.StreamLink.IContainerSubscriptionParameters.SetWindow ( int  start,
int  size 
)

Sets the size of the container window.

  • Parameters
    startThe index of the first container element within the window, where the first container element has an index value of 0 (zero).
  • Parameters
    sizeThe maximum number of container elements within the window.
  • Returns
    The update ContainerSubscriptionParameters object to permit a fluent programming style.

Generated on Tue Mar 24 2020 11:57:49 for StreamLink.NET