protected override void Show(IDialogVisualizerService windowService, IVisualizerObjectProvider objectProvider)
        {
            var data = (DataTable)VisualizerObjectSource.Deserialize(objectProvider.GetData());

            windowService.ShowDialog(new ListForm {
                Data = data
            });
        }
コード例 #2
0
        public static void TestSerialize(object enumerableToVisualize)
        {
            //Assert.IsInstanceOfType(enumerableToVisualize, typeof(IEnumerable));
            var enumerableVisualizerObjectSource = new EnumerableVisualizerObjectSource();
            var memoryStream = new MemoryStream();

            enumerableVisualizerObjectSource.GetData(enumerableToVisualize, memoryStream);
            memoryStream.Position = 0;
            Assert.AreNotEqual(0, memoryStream.Length);
            var value = VisualizerObjectSource.Deserialize(memoryStream);

            if (!(value is DataTableSurrogate) && !(value is IListSource) && value.GetType() != enumerableToVisualize.GetType())
            {
                Assert.IsInstanceOfType(value, typeof(IBindingListView));
            }
        }