C# (CSharp) Examples Namespace

Nested Namespaces

Examples.BankAccount
Examples.Chapter1
Examples.Chapter16
Examples.ChromiumFx
Examples.ContentEditorCulture
Examples.Conventions
Examples.Droid
Examples.EXM
Examples.Editor
Examples.ExamplesChat
Examples.ExamplesConsole
Examples.ExamplesFileTransfer
Examples.Expressions
Examples.FirstProject
Examples.Fixtures
Examples.Issues
Examples.NLog
Examples.OpenAL
Examples.Scenes
Examples.Serialization
Examples.Shapes
Examples.TelerikWindowManager
Examples.Tests
Examples.Tutorial
Examples.Wildcard
Examples.WinForms
Examples.iOS

Classes

Name Description
App
BankAccount
ClassWithBaseAndInterfaces
ClassWithInterfaces
ClientConsumingRecordTopics This demonstrates a client consuming record topics and reading the content using a structured reader. This makes use of the 'Topics' feature only. To subscribe to a topic, the client session must have the 'read_topic' permission for that branch of the topic tree. This example receives updates to currency conversion rates via a branch of the topic tree where the root topic is called 'FX'; beneath which is a topic for each base currency, and beneath each of those is a topic for each target currency which contains the bid and ask rates. So a topic 'FX/GBP/USD' would contain the rates for GBP to USD. This example maintains a local dictionary of the rates and also notifies a listener of any rates changes. The example shows the use of empty fields. Any of the rates can be empty (meaning the rate is not available in this example), so it can be an empty string in the topic value. Because delta updates use a zero-length string to indicate that a field has not changed, a special 'empty field' value is used to indicate that the field has changed to empty in deltas. The client application must therefore convert empty string values to "" for the local rate value.
ClientConsumingRecordTopics.Currency Encapsulates a base currency and all of its knownn rates.
ClientConsumingRecordTopics.Rates
ClientConsumingRecordTopics.RatesTopicStream
ClientCreatingMetadata This example class has a number of methods that demonstrate the creation of metadata using the Diffusion Unified API. Metadata is normally created by a control client in order to create topics, but a standard client could create metadata to interpret content (however, it would make much more sense to get the details of the topic which would include its metadata). This example shows the creation of various types of metadata in different methods. Content metadata is used by record type topics. Record metadata is used by paged record topics and field metadata is used by single value topics. Note that no client session is required in order to create metadata.
ClientReconnection These examples show how to configure and enable the reconnection feature of the API. Every method represents a different selfcontained example.
ClientReconnection.MyReconnectionStrategy This is a custom reconnection strategy that will try to reconnect to the server up to 3 times and then abort.
ClientSendingMessages This is a simple example of a client that uses the 'Messaging' feature to send messages on a topic path. To send messages on a topic path, the client session requires the TopicPermission.SEND_TO_MESSAGE_HANDLER permission.
ClientUsingCredentials This demonstrates a client's use of credentials, specifically the ability to change the principal for an active session. This is not a realistic use case on its own, but it shown separately here for clarity.
ClientUsingFetch This is a simple example of a client that fetches the state of topics but does not subscribe to them. This makes use of the ITopics feature only.
ClientUsingPings This is a simple client example that pings the server and prints out the round-trip time. This uses the IPings feature only.
ControlAuthenticationClient This is a control client which registers an authentication handler with a server.
ControlAuthenticationEnabler This is a local authentication handler that allows control clients to install their own authentication handlers.
ControlClientAsUpdateSource An example of using a control client as an event feed to a topic. This uses the ITopicControl feature to create a topic and the ITopicUpdateControl feature to send updates to it. To send updates to a topic, the client session requires the TopicPermission.UPDATE_TOPIC permission for that branch of the topic tree.
ControlClientAsUpdateSource.AddCallback
ControlClientAsUpdateSource.RemoveCallback
ControlClientAsUpdateSource.UpdateSource
ControlClientChangingSystemAuthentication
ControlClientChangingSystemAuthentication.ChangeSuperusersToAdministrators
ControlClientChangingSystemAuthentication.InternalUpdateStoreCallback
ControlClientConflateAndThrottle This demonstrates the use of a control client to apply both throttling and conflation to clients. It throttles and conflates all clients that reach their queue thresholds and remove when they go down again. This uses the IClientControl feature.
ControlClientConflateAndThrottle.MyThresholdHandler
ControlClientConnectingAsynchronously This is a simple example of a client that uses asynchronous connection to connect, create a topic and then disconnect.
ControlClientConnectingAsynchronously.TopicAddCallback
ControlClientConnectingAsynchronously.TopicAdder
ControlClientIdentityChecks This demonstrates the use of a control client to authenticate client connections. This uses the IAuthenticationControl feature.
ControlClientIdentityChecks.Handler
ControlClientIdentityChecks.ServerHandlerDefault
ControlClientMissingTopicNotification
ControlClientMissingTopicNotification.MissingTopicHandler Asynchronous helper class for handling missing topic notifications.
ControlClientMissingTopicNotification.TopicsCompletionCallback
ControlClientReceivingMessages This is an example of a control client using the IMessagingControl feature to receive messages from clients and also send messages to clients. It is a trivial example that simply responds to all messages on a particular branch of the topic tree by echoing them back to the client exactly as they are, complete with headers.
ControlClientReceivingMessages.EchoHandler
ControlClientReceivingMessages.MessageHandlerDefault
ControlClientSubscriptionControl This demonstrates using a client to subscribe and unsubscribe other clients to topics. This uses the ISubscriptionControl feature.
ControlClientSubscriptionControlRouting This demonstrates using a control client to be notified of subscription requests to routing topics. This uses the ISubscriptionControl feature.
ControlClientSubscriptionControlRouting.SubscriptionHandler
ControlClientUpdatingJSONTopics This example shows a control client creating a JSON topic and sending updates to it. There will be a topic for each currency for which rates are provided. The topic will be created under the FX topic - so, for example FX/GBP will contain a map of all rate conversions from the base GBP currency. The rates are represented as string decimal values (e.g. "12.457"). The addRates method shows how to create a new rates topic, specifying its initial map of values. The changeRates method which takes a map shows how to completely replace the set of rates for a currency with a new map of rates. The changeRates method which takes a string shows an alternative mechanism where the new rates are simply supplied as a JSON string. Either of the changeRates methods could be used and after the first usage for any topic the values is cached, and so subsequent set calls can compare with the last value and send only the differences to the server.
ControlClientUpdatingJSONTopics.MyTopicControlRemoveCallback
ControlClientUpdatingJSONTopics.MyTopicUpdateSource
ControlClientUpdatingPagedTopics An example of using a control client to create and update paged topics. This uses the ITopicControl feature to create a paged topic and the ITopicUpdateControl feature to send updates to it. This demonstrates some simple examples of paged topic updates but not all of the possible ways in which they can be done. To send updates to a topic, the client session requires the UPDATE_TOPIC permission for that branch of the topic tree.
ControlClientUpdatingPagedTopics.RemoveCallback
ControlClientUpdatingPagedTopics.UpdateSource
ControlClientUpdatingRecordTopics An example of using a control client to create and update a record topic in exclusive mode. This uses the topic control feature to create a topic and the topic update control feature to send updates to it. Both 'full' and 'patch' updating techniques are demonstrated. Full updates involve sending the whole topic state to the server; this will be compared with the current state and a delta of any differences published to subscribed clients. With patch updates it is only necessary to send the values of the fields that have changed to the server where they will be applied to the current topic state and published to subscribers. The latter mechanism is not so well suited to this example where there are only 2 fields, but for topics with many fields this could represent considerable savings in the amount of data sent to the server. To send updates to a topic, the client session requires the 'update_topic' permission for that branch of the topic tree. The example also demonstrates a simple usage of a structured record builder for generating content as such a builder validates the input against the metadata.
ControlClientUpdatingRecordTopics.RemoveCallback
ControlClientUpdatingRecordTopics.TopicUpdateSource
ControlClientUpdatingTopic An example of using a control client to create and update a topic in non-exclusive mode (as opposed to acting as an exclusive update source). In this mode other clients could update the same topic (on a 'last update wins' basis). This uses the ITopicControl feature to create a topic and the ITopicUpdateControl feature to send updates to it. To send updates to a topic, the client session requires the 'update_topic' permission for that branch of the topic tree.
ControlClientUpdatingTopic.RemoveCallback
ControlClientUsingFiltersAndProperties This is an example of a control client using the 'MessagingControl' feature to send messages to clients using message filters. It also demonstrates the ability to register a message handler with an interest in session property values.
ControlClientUsingFiltersAndProperties.BroadcastHandler
ControlClientUsingSessionProperties This is an example of a control client using both the client control and the subscription control feature to monitor and subscribe clients. The example shows a control client that wants all clients that are in Italy and are in the 'Accounts' department (determined by an additional property) to be subscribed to the 'ITAccounts' topic. It also has a method which makes use of filtered subscription to change the topic that all matching clients are subscribed to.
ControlClientUsingSessionProperties.PropertiesListener This session properties listener will be notified firstly of all open client sessions and then of all that subsequently open. All that are in the Italian Accounts department get subscribed to the current topic.
DemoListViewPageModel
DetailPageModel
DogsItemViewModel
ExampleControlAuthenticationHandler Implementation of IControlAuthenticationHandler.
ExampleHelper Static class containing some static helper method used during example execution.
Examples
FullscreenAntialias
GettingStarted
GettingStarted.ProductRepository
KademliaRepositoryExamples Example Module for kademlia-specific repository.
MainClass
MainPageModel
MethodAsync
MethodAsyncReturnValue
MethodAsyncReturnValueWithoutAsyncKeyword
MethodAsyncVoid
MethodAsyncWithoutAsyncKeyword
Money
NestedLoop
NunchukExample
PeriodicTaskFactory Factory class to create a periodic Task to simulate a System.Threading.Timer using Tasks.
Playback
Program
Program.ChartData
ProgrammingExamples This class enables the developer to execute the programming examples contained in the specific classes. Currently there are 3 example modules: Tag, Generic Repository, Kademlia-specific repository. If the Console Application is launched with one or more example module names only this specific examples will be launched ProgrammingExamples.exe tag rep
RepositoryExamples Example module for Generic use of raven repository.
StartupTask
TagExamples Example module for Tag-related operations