Table of Contents

Class Diffusion

Namespace
PushTechnology.ClientInterface.Client.Factories
Assembly
Diffusion.Client.dll

The Diffusion factory of factories.

Static properties are available which return the singleton instance of each type of factory available.

public static class Diffusion
Inheritance
Diffusion
Inherited Members

Properties

Credentials

Returns the singleton credentials factory.

public static ICredentialsFactory Credentials { get; }

Property Value

ICredentialsFactory

The singleton credentials factory.

DataTypes

Returns the IDataTypes implementations.

public static IDataTypes DataTypes { get; }

Property Value

IDataTypes

The IDataTypes implementations.

Remarks

Since 5.8

ProxyAuthentication

Returns a proxy authentication scheme factory.

public static IProxyAuthenticationFactory ProxyAuthentication { get; }

Property Value

IProxyAuthenticationFactory

A proxy authentication scheme factory.

Sessions

Returns the singleton session factory.

public static ISessionFactory Sessions { get; }

Property Value

ISessionFactory

The singleton session factory.

TopicSelectors

Returns a parser for topic selector expressions.

[Obsolete("Topic selectors are now deprecated and will be removed in a future release. Use string expressions instead.", false)]
public static ITopicSelectors TopicSelectors { get; }

Property Value

ITopicSelectors

A parser for topic selector expressions.

Remarks

Caution

Deprecated since 6.4. Topic selectors are no longer verified locally by the client library. Instead System.String expressions will be sent to (and verified by) the Diffusion server. This method will be removed in a future release.

UpdateConstraints

Gets the update constraint factory.

public static IUpdateConstraintFactory UpdateConstraints { get; }

Property Value

IUpdateConstraintFactory

The update constraint factory.

Methods

EscapeString(string)

Escapes special characters within a string.

public static string EscapeString(string value)

Parameters

value string

The string value to be escaped.

Returns

string

The escaped string.

Remarks

The following characters will be escaped:

Special CharacterEscaped Form
\"\\\"
\'\\\'
\\\\\\
\b\\b
\f\\f
\n\\n
\r\\r
\t\\t

Unicode characters will not be escaped and UTF-16 as well as UTF-32 escape sequences will also remain.

NewBranchMappingTableBuilder()

public static IBranchMappingTableBuilder NewBranchMappingTableBuilder()

Returns

IBranchMappingTableBuilder

The branch mapping table builder.

NewRemoteServerBuilder()

Creates a new IRemoteServerBuilder.

[Obsolete("This method may only be used to create an old style builder for secondary initiators.The newer NewRemoteServerBuilder() specifying the secondary initiator builder class should be used in preference.This method will be removed in a future release.", false)]
public static IRemoteServerBuilder NewRemoteServerBuilder()

Returns

IRemoteServerBuilder

The remote server builder.

Remarks

Since 6.7

Caution

Deprecated since 6.9. This method may only be used to create an old style builder for secondary initiators. The newer NewRemoteServerBuilder() specifying the secondary initiator builder class should be used in preference. This method will be removed in a future release.

NewSessionEventParametersBuilder()

public static ISessionEventParametersBuilder NewSessionEventParametersBuilder()

Returns

ISessionEventParametersBuilder

The builder.

Remarks

Since 6.11.

NewSessionMetricCollectorBuilder()

public static ISessionMetricCollectorBuilder NewSessionMetricCollectorBuilder()

Returns

ISessionMetricCollectorBuilder

The session metric collector builder.

NewSpecification(TopicType)

Creates a new ITopicSpecification for a given topic type.

public static ITopicSpecification NewSpecification(TopicType topicType)

Parameters

topicType TopicType

The topic type.

Returns

ITopicSpecification

The new immutable specification with no properties set. New specifications with properties set may be produced using the WithProperty(string, string) or WithProperties(IDictionary<string, string>) methods of the provided specification.

NewTopicMetricCollectorBuilder()

public static ITopicMetricCollectorBuilder NewTopicMetricCollectorBuilder()

Returns

ITopicMetricCollectorBuilder

The topic metric collector builder.

RolesToString(IReadOnlyCollection<string>)

Converts a collection of roles to an escaped string representation.

public static string RolesToString(IReadOnlyCollection<string> roles)

Parameters

roles IReadOnlyCollection<string>

The collection of roles.

Returns

string

The escaped string representation of the roles.

Remarks

Every item in roles will be quoted and escaped based on the same rules as EscapeString(string).

Every item in roles will be separated by a comma in the resulting string.

Given a collection with two roles ("A" and "B") the resulting role string would be "\"A\", \"B\"".

SessionIdFromString(string)

Restore a ISessionId from a string.

public static ISessionId SessionIdFromString(string sessionIdAsString)

Parameters

sessionIdAsString string

A string previously created with the ToString() method.

Returns

ISessionId

The ISessionId.

Remarks

This method allows a ISessionId to be parsed from a string in the format as generated by the ToString() method.

Since 6.10.

Exceptions

ArgumentNullException

The sessionIdAsString is null.

ArgumentException

If the string was not compatible with the format as generated by ToString().

StringToRoles(string)

Converts a string of roles to a collection of roles.

public static IReadOnlyCollection<string> StringToRoles(string value)

Parameters

value string

The string value to convert to a collection of roles.

Returns

IReadOnlyCollection<string>

The collection of roles.

Remarks

The given string value must quote and separate each role with a comma. Whitespace characters in between the roles will be ignored.

Every role found in the given value will also be unquoted.

A string value of "\"A\", \"B\"" will result in a collection with the items "A" and "B".