예제 #1
0
            public void Visit( Member member )
            {
                var dataSourceAttr = member.GetDataSourceAttribute();
                if ( dataSourceAttr == null )
                {
                    return;
                }

                myContainer.BindDataSource( member );
            }
예제 #2
0
        private void BindDataSource( Member member )
        {
            if ( !DataSourceFactory.CanCreate( member.DataSourceName, member.ReturnType ) )
            {
                throw new Exception( "Cannot bind a datasource to member: " + member.MemberInfo.Name );
            }

            var attr = member.GetDataSourceAttribute();
            var dataSource = DataSourceFactory.Create( member.DataSourceName, member.ReturnType, attr.GetConstructorArguments() );
            member.Value = dataSource;
        }
예제 #3
0
        private bool IsTraversableMember( Member member )
        {
            var value = member.Value;
            if ( value == null )
            {
                return false;
            }

            if ( typeof( ValueType ).IsAssignableFrom( value.GetType() ) )
            {
                return false;
            }

            if ( IsTraversableContainer( value ) )
            {
                return true;
            }

            if ( value.GetType().IsSystemType() )
            {
                return false;
            }

            return true;
        }
예제 #4
0
 public bool StepInto( Member member )
 {
     return true;
 }