Class Diffusion
The Diffusion factory of factories.
Static properties are available which return the singleton instance of each type of factory available.
Namespace: PushTechnology.ClientInterface.Client.Factories
Assembly: Diffusion.Client.dll
Syntax
public static class Diffusion : object
Properties
Credentials
Returns the singleton credentials factory.
Declaration
public static ICredentialsFactory Credentials { get; }
Property Value
Type | Description |
---|---|
ICredentialsFactory | The singleton credentials factory. |
DataTypes
Returns the IDataTypes implementations.
Declaration
public static IDataTypes DataTypes { get; }
Property Value
Type | Description |
---|---|
IDataTypes | The IDataTypes implementations. |
Remarks
Since 5.8
ProxyAuthentication
Returns a proxy authentication scheme factory.
Declaration
public static IProxyAuthenticationFactory ProxyAuthentication { get; }
Property Value
Type | Description |
---|---|
IProxyAuthenticationFactory | A proxy authentication scheme factory. |
Sessions
Returns the singleton session factory.
Declaration
public static ISessionFactory Sessions { get; }
Property Value
Type | Description |
---|---|
ISessionFactory | The singleton session factory. |
TopicSelectors
Returns a parser for topic selector expressions.
Declaration
public static ITopicSelectors TopicSelectors { get; }
Property Value
Type | Description |
---|---|
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.
Declaration
public static IUpdateConstraintFactory UpdateConstraints { get; }
Property Value
Type | Description |
---|---|
IUpdateConstraintFactory | The update constraint factory. |
Methods
EscapeString(String)
Escapes special characters within a string.
Declaration
public static string EscapeString(string value)
Parameters
Type | Name | Description |
---|---|---|
String | value | The string value to be escaped. |
Returns
Type | Description |
---|---|
String | The escaped string. |
Remarks
The following characters will be escaped:
Special Character | Escaped 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()
Creates a new IBranchMappingTableBuilder.
Declaration
public static IBranchMappingTableBuilder NewBranchMappingTableBuilder()
Returns
Type | Description |
---|---|
IBranchMappingTableBuilder | The branch mapping table builder. |
NewRemoteServerBuilder()
Creates a new IRemoteServerBuilder.
Declaration
public static IRemoteServerBuilder NewRemoteServerBuilder()
Returns
Type | Description |
---|---|
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.
NewSessionMetricCollectorBuilder()
Creates a new ISessionMetricCollectorBuilder.
Declaration
public static ISessionMetricCollectorBuilder NewSessionMetricCollectorBuilder()
Returns
Type | Description |
---|---|
ISessionMetricCollectorBuilder | The session metric collector builder. |
NewSpecification(TopicType)
Creates a new ITopicSpecification for a given topic type.
Declaration
public static ITopicSpecification NewSpecification(TopicType topicType)
Parameters
Type | Name | Description |
---|---|---|
TopicType | topicType | The topic type. |
Returns
Type | Description |
---|---|
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()
Creates a new ITopicMetricCollectorBuilder.
Declaration
public static ITopicMetricCollectorBuilder NewTopicMetricCollectorBuilder()
Returns
Type | Description |
---|---|
ITopicMetricCollectorBuilder | The topic metric collector builder. |
RolesToString(IReadOnlyCollection<String>)
Converts a collection of roles to an escaped string representation.
Declaration
public static string RolesToString(IReadOnlyCollection<string> roles)
Parameters
Type | Name | Description |
---|---|---|
IReadOnlyCollection<String> | roles | The collection of roles. |
Returns
Type | Description |
---|---|
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.
Declaration
public static ISessionId SessionIdFromString(string sessionIdAsString)
Parameters
Type | Name | Description |
---|---|---|
String | sessionIdAsString | A string previously created with the |
Returns
Type | Description |
---|---|
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.
StringToRoles(String)
Converts a string of roles to a collection of roles.
Declaration
public static IReadOnlyCollection<string> StringToRoles(string value)
Parameters
Type | Name | Description |
---|---|---|
String | value | The string value to convert to a collection of roles. |
Returns
Type | Description |
---|---|
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"
.