public LocalClrPropertyImplementation(IPlatformMetadata platformMetadata, System.Reflection.PropertyInfo propertyInfo, Type declaringType, object[] indexParameters) : base(platformMetadata) { this.declaringType = declaringType ?? propertyInfo.DeclaringType; this.propertyInfo = propertyInfo; this.getMethod = this.propertyInfo.GetGetMethod(true); this.setMethod = this.propertyInfo.GetSetMethod(true); this.indexParameters = indexParameters; this.isResolved = PlatformTypeHelper.GetPropertyType(this.propertyInfo) != null; }
public static IType GetPropertyTypeId(ITypeResolver typeResolver, PropertyInfo propertyInfo) { Type propertyType = PlatformTypeHelper.GetPropertyType(propertyInfo); if (propertyType != (Type)null) { return(typeResolver.GetType(propertyType)); } return((IType)null); }
protected virtual IList <IPropertyId> GetStyleProperties() { IList <IPropertyId> propertyIds = new List <IPropertyId>(); Type runtimeType = null; foreach (IProperty property in this.Properties) { if (runtimeType == null) { runtimeType = property.DeclaringType.PlatformMetadata.ResolveType(PlatformTypes.Style).RuntimeType; } if (!runtimeType.IsAssignableFrom(PlatformTypeHelper.GetPropertyType(property))) { continue; } propertyIds.Add(property); } return(propertyIds); }