public MainViewController()
            : base(UITableViewStyle.Plain, null)
        {
            var initDictionary = new NSDictionary(Constants.TDMOrgID, "pdj3oyez", Constants.TDMDelegate, this, "location_services", true, Constants.TDMTimeout, 10000, Constants.TDMApiKey, "api_key");

              trustDefender = new TrustDefenderMobile(initDictionary);

              Root = new RootElement("TrustDefenderMobile")
              {
            new Section("Profiling")
            {
              new StringElement("Do Profile Request", () =>
            {
              var responce = trustDefender.DoProfileRequest();
              ShowAlert(responce.ToString());
            }),
              new StringElement("Do Profile Request (options)", () =>
            {
              var responce = trustDefender.DoProfileRequest(new NSDictionary(Constants.TDMSessionID, "id"));
              ShowAlert(responce.ToString());
            }),
              new StringElement("Do Profile Request with Callback", () =>
            {
              var responce = trustDefender.DoProfileRequestWithCallback(Callback);
              ShowAlert(responce.ToString());
            }),
              new StringElement("Do Profile Request with Options", () =>
            {
              var responce = trustDefender.DoProfileRequestWithOptions(new NSDictionary(Constants.TDMSessionID, "id"), Callback);
              ShowAlert(responce.ToString());
            }),
            },
            new Section("Getters")
            {
              new StringElement("Get Result", () =>
            {
              var result = trustDefender.Result;

              ShowAlert(result.ToString());
            }),
              new StringElement("Get Version", () =>
            {
              var version = trustDefender.Version;
              ShowAlert(version);
            })
            },
            new Section("Other")
            {
              new StringElement("Pause true", () => trustDefender.PauseLocationServices(true)),
              new StringElement("Pause false", () => trustDefender.PauseLocationServices(true)),
              new StringElement("Cancel", trustDefender.Cancel)
            }
              };
        }
Example #2
0
        public MainViewController()
            : base(UITableViewStyle.Plain, null)
        {
            var initDictionary = new NSDictionary(Constants.TDMOrgID, "pdj3oyez", Constants.TDMDelegate, this, "location_services", true, Constants.TDMTimeout, 10000, Constants.TDMApiKey, "api_key");

            trustDefender = new TrustDefenderMobile(initDictionary);

            Root = new RootElement("TrustDefenderMobile")
            {
                new Section("Profiling")
                {
                    new StringElement("Do Profile Request", () =>
                    {
                        var responce = trustDefender.DoProfileRequest();
                        ShowAlert(responce.ToString());
                    }),
                    new StringElement("Do Profile Request (options)", () =>
                    {
                        var responce = trustDefender.DoProfileRequest(new NSDictionary(Constants.TDMSessionID, "id"));
                        ShowAlert(responce.ToString());
                    }),
                    new StringElement("Do Profile Request with Callback", () =>
                    {
                        var responce = trustDefender.DoProfileRequestWithCallback(Callback);
                        ShowAlert(responce.ToString());
                    }),
                    new StringElement("Do Profile Request with Options", () =>
                    {
                        var responce = trustDefender.DoProfileRequestWithOptions(new NSDictionary(Constants.TDMSessionID, "id"), Callback);
                        ShowAlert(responce.ToString());
                    }),
                },
                new Section("Getters")
                {
                    new StringElement("Get Result", () =>
                    {
                        var result = trustDefender.Result;

                        ShowAlert(result.ToString());
                    }),
                    new StringElement("Get Version", () =>
                    {
                        var version = trustDefender.Version;
                        ShowAlert(version);
                    })
                },
                new Section("Other")
                {
                    new StringElement("Pause true", () => trustDefender.PauseLocationServices(true)),
                    new StringElement("Pause false", () => trustDefender.PauseLocationServices(true)),
                    new StringElement("Cancel", trustDefender.Cancel)
                }
            };
        }
 public void Contructor()
 {
     try
       {
     var s = new TrustDefenderMobile();
       }
       catch (Exception e)
       {
     Assert.Fail(e.Message);
       }
       Assert.Pass();
 }
 public void ConstructorWithParams()
 {
     try
       {
     var s = new TrustDefenderMobile(new NSDictionary("org_id", "pdj3oyez"));
       }
       catch (Exception e)
       {
     Assert.Fail(e.Message);
       }
       Assert.Pass();
 }
Example #5
0
 public void Contructor()
 {
     try
     {
         var s = new TrustDefenderMobile();
     }
     catch (Exception e)
     {
         Assert.Fail(e.Message);
     }
     Assert.Pass();
 }
Example #6
0
 public void ConstructorWithParams()
 {
     try
     {
         var s = new TrustDefenderMobile(new NSDictionary("org_id", "pdj3oyez"));
     }
     catch (Exception e)
     {
         Assert.Fail(e.Message);
     }
     Assert.Pass();
 }