コード例 #1
0
        public async Task EntryCellDisposed()
        {
            var text1 = "Foo";
            var text2 = "Bar";
            var model = new _5560Model()
            {
                Text = text1
            };

            for (int m = 0; m < 3; m++)
            {
                var entryCell = new EntryCell();
                entryCell.SetBinding(EntryCell.TextProperty, new Binding("Text"));
                entryCell.SetBinding(EntryCell.BindingContextProperty, new Binding("BindingContext"));
                entryCell.BindingContext = model;
                CellFactory.GetCell(entryCell, null, null, Context, null);

                if (m == 1)
                {
                    GC.Collect();
                }

                model.Text = model.Text == text1 ? text2 : text1;
            }

            await model.WaitForTestToComplete().ConfigureAwait(false);
        }
コード例 #2
0
        public void EntryCellDisposed()
        {
            var text1 = "Foo";
            var text2 = "Bar";
            var model = new _5560Model()
            {
                Text = text1
            };

            for (int m = 0; m < 3; m++)
            {
                var entryCell = new EntryCell();
                entryCell.SetBinding(EntryCell.TextProperty, new Binding("Text"));
                entryCell.BindingContext = model;
                CellFactory.GetCell(entryCell, null, null, Context, null);

                if (m == 1)
                {
                    GC.Collect();
                }

                model.Text = model.Text == text1 ? text2 : text1;
            }
        }