예제 #1
0
    void dispatchEvent()
    {
        print("Calling Dispatching event");
        var dict = new Dictionary <string, object>();

        dict.Add("eventDataKey", "eventDataValue");
        ACPCore.DispatchEvent(new ACPExtensionEvent("eventname", "eventType", "eventSource", dict), HandleAdobeExtensionErrorCallback);
    }
        public TaskCompletionSource <string> DispatchEvent()
        {
            stringOutput = new TaskCompletionSource <string>();
            var data = new Dictionary <string, Java.Lang.Object>();

            data.Add("testEvent", true);
            Event sdkEvent = new Event.Builder("eventName", "eventType", "eventSource").SetEventData(data).Build();

            stringOutput.SetResult(ACPCore.DispatchEvent(sdkEvent, new ErrorCallback()).ToString());
            return(stringOutput);
        }
        public void DispatchValidSDKEvent_Returns_True()
        {
            // setup
            var data = new Dictionary <string, Java.Lang.Object>();

            data.Add("testEvent", true);
            Event sdkEvent = new Event.Builder("eventName", "eventType", "eventSource").SetEventData(data).Build();
            // test
            var status = ACPCore.DispatchEvent(sdkEvent, new ErrorCallback());

            // verify
            Assert.That(status, Is.EqualTo(true));
        }
예제 #4
0
        public void DispatchValidSDKEvent_Returns_True()
        {
            // setup
            var data = new NSMutableDictionary <NSString, NSObject>
            {
                ["dispatchResponseEventKey"] = new NSString("dispatchResponseEventValue")
            };
            ACPExtensionEvent sdkEvent = ACPExtensionEvent.ExtensionEventWithName("eventName", "eventType", "eventSource", data, out _);
            // test
            var status = ACPCore.DispatchEvent(sdkEvent, out _);

            // verify
            Assert.That(status, Is.EqualTo(true));
        }
예제 #5
0
        public TaskCompletionSource <string> DispatchEvent()
        {
            stringOutput = new TaskCompletionSource <string>();
            NSError error;
            var     data = new NSMutableDictionary <NSString, NSObject>
            {
                ["dispatchResponseEventKey"] = new NSString("dispatchResponseEventValue")
            };
            ACPExtensionEvent sdkEvent = ACPExtensionEvent.ExtensionEventWithName("eventName", "eventType", "eventSource", data, out _);

            stringOutput.SetResult(ACPCore.DispatchEvent(sdkEvent, out error).ToString());
            if (error != null)
            {
                stringOutput.SetResult(error.LocalizedDescription);
            }
            return(stringOutput);
        }
예제 #6
0
        partial void DispatchEvent(UIButton sender)
        {
            NSError error;
            var     data = new NSMutableDictionary <NSString, NSObject>
            {
                ["dispatchResponseEventKey"] = new NSString("dispatchResponseEventValue")
            };
            ACPExtensionEvent sdkEvent = ACPExtensionEvent.ExtensionEventWithName("eventName", "eventType", "eventSource", data, out _);
            bool result = ACPCore.DispatchEvent(sdkEvent, out error);

            if (error != null)
            {
                Console.WriteLine("DispatchEvent: Error: " + error.LocalizedDescription);
            }
            else
            {
                Console.WriteLine("DispatchEvent: " + result);
            }
        }