// Note: The re-bind-specific IPropertyInformation implementations should no longer be necessary after re-bind is changed to explicitly support // interfaces. (Because re-bind will no longer represent explicit interface properties within the BusinessObjectClass for the class - // the BusinessObjectClass for the interface must be used instead.) private IPropertyInformation GetPropertyInformation(PropertyInfo propertyInfo) { var introducedMemberAttributes = propertyInfo.GetCustomAttributes(typeof(IntroducedMemberAttribute), true); if (introducedMemberAttributes.Length > 0) { var introducedMemberAttribute = (IntroducedMemberAttribute)introducedMemberAttributes[0]; var interfaceProperty = PropertyInfoAdapter.Create(introducedMemberAttribute.IntroducedInterface.GetProperty(introducedMemberAttribute.InterfaceMemberName)); var mixinProperty = interfaceProperty.FindInterfaceImplementation(introducedMemberAttribute.Mixin); var interfaceImplementation = new InterfaceImplementationPropertyInformation(mixinProperty, interfaceProperty); return(new MixinIntroducedPropertyInformation(interfaceImplementation)); } else { var propertyInfoAdapter = PropertyInfoAdapter.Create(propertyInfo); var interfaceDeclaration = propertyInfoAdapter.FindInterfaceDeclarations().FirstOrDefault(); if (interfaceDeclaration != null) { return(new InterfaceImplementationPropertyInformation(propertyInfoAdapter, interfaceDeclaration)); } else { return(propertyInfoAdapter); } } }
public MixinIntroducedPropertyInformation(InterfaceImplementationPropertyInformation interfaceImplementationPropertyInfo) { ArgumentUtility.CheckNotNull("interfaceImplementationPropertyInfo", interfaceImplementationPropertyInfo); _interfaceImplementationPropertyInfo = interfaceImplementationPropertyInfo; }