ChyronHego.DataEngine 0.3.4

There is a newer version of this package available.
See the version list below for details.
Install-Package ChyronHego.DataEngine -Version 0.3.4
dotnet add package ChyronHego.DataEngine --version 0.3.4
<PackageReference Include="ChyronHego.DataEngine" Version="0.3.4" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add ChyronHego.DataEngine --version 0.3.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: ChyronHego.DataEngine, 0.3.4"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install ChyronHego.DataEngine as a Cake Addin
#addin nuget:?package=ChyronHego.DataEngine&version=0.3.4

// Install ChyronHego.DataEngine as a Cake Tool
#tool nuget:?package=ChyronHego.DataEngine&version=0.3.4
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
using ChyronHego.DataEngine;
using System;

namespace DataEngineExample
{
    class Program
    {
        private static DataEngine de = new DataEngine();
        private static DataEngine deSignaler = new DataEngine();

        static void Main(string[] args)
        {
            de.Connected += OnDataEngineConnect;
            de.Event += OnDataEngineEvent;
            de.Connect();
            deSignaler.Connect();

            Console.WriteLine("Press enter key to exit\n");
            Console.ReadLine();
        }

        private static void OnDataEngineEvent(DataEngineEvent dataEngineEvent)
        {
            Console.WriteLine($"Received a write / signal on key {dataEngineEvent.Key} in bucket {dataEngineEvent.Bucket}");
            Console.WriteLine($"Value: {dataEngineEvent.Value}");
            Console.WriteLine($"Is Key Delete Event: {dataEngineEvent.IsDeleted}");
        }

        private static async void OnDataEngineConnect()
        {
            var bucket = "MyBucket";
            var key = "MyKey";

            // Write and persist object to Key
            var someObject = new
            {
                Prop = "Value",
                AnotherProp = "AnotherValue",
                YetAnother = 1000
            };
            Console.WriteLine($"Writing .NET object to key {key} in bucket {bucket}\n");
            await de.WriteAsync(bucket, key, someObject);

            // Read Key
            Console.WriteLine($"Reading key {key} from bucket {bucket}");
            var response = await de.ReadAsync(bucket, key);
            Console.WriteLine(response.Value + "\n");

            // Write and persist raw JSON string
            Console.WriteLine($"Writing raw JSON to key {key} in bucket {bucket}\n");
            await de.WriteAsync(bucket, key, "{ \"rawJson\": true }");

            // Read Key
            Console.WriteLine($"Reading key {key} from bucket {bucket}\n");
            response = await de.ReadAsync(bucket, key);
            Console.WriteLine(response.Value + "\n");

            // Delete Key
            Console.WriteLine($"Deleting key {key} from bucket {bucket}\n");
            await de.DeleteAsync(bucket, key);

            // Register for all events on a specific key or set of keys
            // ** NOTE, Writes and signals will not fire on same instance of DataEngine class **
            Console.WriteLine($"Listening for all signals or writes on key {key} in bucket {bucket}\n");
            await de.RegisterEventsAsync(bucket, new[] { key });

            // Signal Key (does not persist in Data Engine)
            var someMessage = new
            {
                Message = "Some data here"
            };
            Console.WriteLine($"Signaling to key {key} in bucket {bucket}\n");
            // *** NOTE USE OF deSignaler instance to signal event ***
            await deSignaler.SignalEvent(bucket, key, someMessage);   
        }
    }
}

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
0.3.5 600 8/17/2018
0.3.4 1,571 3/26/2018
0.3.3 558 12/13/2017
0.3.1 598 12/6/2017
0.3.0 545 12/5/2017
0.2.9 579 8/31/2017
0.2.8 706 1/10/2017
0.2.7 613 1/6/2017
0.2.6 633 12/19/2016
0.2.5 625 12/19/2016
0.2.4 624 11/10/2016
0.2.3 598 11/7/2016
0.2.2 610 10/4/2016
0.2.1 628 6/23/2016
0.2.0 650 6/14/2016
0.1.9 629 6/3/2016
0.1.8 633 6/1/2016
0.1.7 631 6/1/2016
0.1.6 657 4/1/2016
0.1.5 643 3/31/2016
0.1.4 638 3/9/2016
0.1.3 619 3/9/2016
0.1.2 682 3/7/2016
0.1.1 628 3/3/2016
0.1.0 778 2/23/2016

- Added flag to unwrap JSON replier values (raw values instead of JValues)