public void CreateDataSourceFromDataSource()
        {
            EnumerablePointDataSource ds = new EnumerablePointDataSource(Enumerable.Range(0, 0).Select(i => new Point()));
            var store = DataSourceFactoryStore.Current;

            var newDs = store.BuildDataSource(ds);

            Assert.AreEqual(ds, newDs);
        }
		public override PointDataSourceBase TryBuild(object data)
		{
			IEnumerable<Point> collection = data as IEnumerable<Point>;
			if (collection != null)
			{
				var dataSource = new EnumerablePointDataSource(collection);
				return dataSource;
			}

			return null;
		}
Example #3
0
        public override PointDataSourceBase TryBuild(object data)
        {
            IEnumerable <Point> collection = data as IEnumerable <Point>;

            if (collection != null)
            {
                var dataSource = new EnumerablePointDataSource(collection);
                return(dataSource);
            }

            return(null);
        }
		public override bool TryBuild(object data, out PointDataSourceBase dataSource)
		{
			dataSource = null;

			IEnumerable<Point> collection = data as IEnumerable<Point>;
			if (collection != null)
			{
				dataSource = new EnumerablePointDataSource(collection);
				return true;
			}
			else
			{
				return false;
			}
		}
        public override bool TryBuild(object data, out PointDataSourceBase dataSource)
        {
            dataSource = null;

            IEnumerable <Point> collection = data as IEnumerable <Point>;

            if (collection != null)
            {
                dataSource = new EnumerablePointDataSource(collection);
                return(true);
            }
            else
            {
                return(false);
            }
        }