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

                myContainer.BindDataSource( member );
            }
Beispiel #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;
        }
Beispiel #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;
        }
Beispiel #4
0
 public bool StepInto( Member member )
 {
     return true;
 }