public void Visit( Member member ) { var dataSourceAttr = member.GetDataSourceAttribute(); if ( dataSourceAttr == null ) { return; } myContainer.BindDataSource( member ); }
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; }
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; }
public bool StepInto( Member member ) { return true; }