public void InvalidDecode(int length)
        {
            // Must still generate values that would be a valid guid pair
            var data = new string('0', length);

            Assert.Throws <ArgumentOutOfRangeException>("encodedParameter", () => DatabaseGroupParameter.Decode(data));
        }
        public void ParameterDecode()
        {
            var db        = Guid.Parse("070a6a32-cb1f-40b8-93f0-8f04cc68c662");
            var group     = Guid.Parse("75b4dd9e-2268-4ab6-876a-c05bd917a64d");
            var parameter = DatabaseGroupParameter.Decode("070a6a32cb1f40b893f08f04cc68c66275b4dd9e22684ab6876ac05bd917a64d");

            Assert.Equal(db, parameter.Database.Id);
            Assert.Equal(group, parameter.Group.Id);
        }
        protected override async void OnNavigatedTo(NavigationEventArgs e)
        {
            var key = DatabaseGroupParameter.Decode((string)e.Parameter);

            await Model.SetDatabase(key.Database, key.Group);
        }
Beispiel #4
0
        private Task LoadAsync(string parameter)
        {
            var key = DatabaseGroupParameter.Decode(parameter);

            return(Model.SetDatabaseAsync(key.Database, key.Group));
        }