Re[2]: ObjectBinder - немного дополнительного функционал
От: albenik Россия  
Дата: 23.02.09 18:06
Оценка:
И снова сам себе отвечаю
По поводу 2го пункта:
Ну за то, что я предложил вначале меня надо бить по рукам больно, вторая попытка

TypeAccessor.cs:817
if (!isList &&
    !propertyType.IsValueType &&
    !propertyType.IsArray &&
    (!propertyType.FullName.StartsWith("System.") || explicitlyBound
    || propertyType.IsGenericType) &&
     propertyType != typeof(Type) &&
     propertyType != typeof(string) &&
     propertyType != typeof(object) &&
    Array.IndexOf(parentTypes, propertyType) == -1)
{
    Type[] childParentTypes = new Type[parentTypes.Length + 1];

    parentTypes.CopyTo(childParentTypes, 0);
    childParentTypes[parentTypes.Length] = itemType;

    PropertyDescriptor[] childParentAccessors = new PropertyDescriptor[parentAccessors.Length + 1];

    parentAccessors.CopyTo(childParentAccessors, 0);
    childParentAccessors[parentAccessors.Length] = pd;

    PropertyDescriptorCollection pdch = GetAccessor(propertyType).PropertyDescriptors;

    pdch = pdch.Sort(new PropertyDescriptorComparer());
    pdch = GetExtendedProperties(
        pdch,
        propertyType,
        propertyPrefix + pd.Name + "+",
        childParentTypes,
        childParentAccessors,
        isNull);

    //НОВОЕ -BEGIN
    if (propertyPrefix.Length != 0 || isNull != null)
        pd = new StandardPropertyDescriptor(pd, propertyPrefix, parentAccessors, isNull);
    objects.Add(pd);
    //НОВОЕ - END
    objects.AddRange(pdch);
}
else
{
    if (propertyPrefix.Length != 0 || isNull != null)
        pd = new StandardPropertyDescriptor(pd, propertyPrefix, parentAccessors, isNull);

    list.Add(pd);
}
 
Подождите ...
Wait...
Пока на собственное сообщение не было ответов, его можно удалить.