示例#1
0
 public TaskCompletionSource <string> SetVisitorIdentifier()
 {
     stringOutput = new TaskCompletionSource <string>();
     ACPAnalytics.SetVisitorIdentifier("testVisitorIdentifier");
     stringOutput.SetResult("completed");
     return(stringOutput);
 }
        public void GetCustomVisitorIdentifier_Gets_PreviouslySetCustomVisitorIdentifier()
        {
            // setup
            latch = new CountdownEvent(1);
            var expectedIdentifier = "someVisitorIdentifier";

            ACPAnalytics.SetVisitorIdentifier(expectedIdentifier);
            // test
            ACPAnalytics.GetVisitorIdentifier(new VisitorIdentifierCallback());
            latch.Wait();
            latch.Dispose();
            // verify
            Assert.That(retrievedVisitorIdentifier, Is.EqualTo(expectedIdentifier));
        }
        public void GetCustomVisitorIdentifier_Gets_PreviouslySetCustomVisitorIdentifier()
        {
            // setup
            var    latch = new CountdownEvent(1);
            string retrievedIdentifier = "";
            string expectedIdentifier  = "someVisitorIdentifier";

            ACPAnalytics.SetVisitorIdentifier(expectedIdentifier);
            // test
            ACPAnalytics.GetVisitorIdentifier(callback =>
            {
                retrievedIdentifier = callback.ToString();
                latch.Signal();
            });
            latch.Wait();
            latch.Dispose();
            // verify
            Assert.That(retrievedIdentifier, Is.EqualTo(expectedIdentifier));
        }
示例#4
0
 partial void SetVisitorIdentifier(UIButton sender)
 {
     ACPAnalytics.SetVisitorIdentifier("testVisitorIdentifier");
     Console.WriteLine("SetVisitorIdentifier: Completed");
 }
示例#5
0
 void SetVisitorIdentifier()
 {
     Debug.Log("Calling setVisitorIdentifier");
     ACPAnalytics.SetVisitorIdentifier(visitorIdentifier.text);
 }