ChyronHego.DataEngine 0.3.4

There is a newer version of this package available.
See the version list below for details.
dotnet add package ChyronHego.DataEngine --version 0.3.4
NuGet\Install-Package ChyronHego.DataEngine -Version 0.3.4
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<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
#r "nuget: ChyronHego.DataEngine, 0.3.4"
#r directive can be used in F# Interactive and Polyglot Notebooks. 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
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);   
        }
    }
}
Product Compatible and additional computed target framework versions.
.NET Framework net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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 1,193 8/17/2018
0.3.4 2,913 3/26/2018
0.3.3 983 12/13/2017
0.3.1 1,055 12/6/2017
0.3.0 960 12/5/2017
0.2.9 1,004 8/31/2017
0.2.8 1,169 1/10/2017
0.2.7 1,057 1/6/2017
0.2.6 1,067 12/19/2016
0.2.5 1,014 12/19/2016
0.2.4 1,041 11/10/2016
0.2.3 1,019 11/7/2016
0.2.2 1,025 10/4/2016
0.2.1 1,038 6/23/2016
0.2.0 1,451 6/14/2016
0.1.9 1,052 6/3/2016
0.1.8 1,056 6/1/2016
0.1.7 1,124 6/1/2016
0.1.6 1,076 4/1/2016
0.1.5 1,071 3/31/2016
0.1.4 1,064 3/9/2016
0.1.3 1,050 3/9/2016
0.1.2 1,122 3/7/2016
0.1.1 1,145 3/3/2016
0.1.0 1,514 2/23/2016

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