public IConstructorArgumentProperties GetConstructorArgumentProperties() { if (this.constructorArgumentProperties == null) { this.constructorArgumentProperties = PlatformTypeHelper.GetConstructorArgumentProperties(this); } return(this.constructorArgumentProperties); }
public bool Refresh() { ITypeId typeId = this.baseType; IPropertyId propertyId = this.nameProperty; IPropertyId propertyId1 = this.defaultContentProperty; ITypeId typeId1 = this.itemType; ITypeId typeId2 = this.nullableType; System.ComponentModel.TypeConverter typeConverter = this.typeConverter; IAssembly assembly = this.GetAssembly(this.typeResolver, this.assemblyName); if (!assembly.IsLoaded) { return(true); } this.assembly = assembly; this.type = this.GetRuntimeType(); this.typeConverter = null; this.initializationException = null; if (this.type != null) { this.lastResolvedType = this.type; this.isBuilt = true; } this.Cache(); bool flag = true; if (this.constructors != null) { foreach (Constructor constructor in this.constructors) { ICachedMemberInfo cachedMemberInfo = constructor; if (cachedMemberInfo == null || cachedMemberInfo.Refresh()) { continue; } flag = false; } if (flag && this.type != null) { int num = 0; ConstructorInfo[] constructors = PlatformTypeHelper.GetConstructors(this.type); if (constructors != null) { ConstructorInfo[] constructorInfoArray = constructors; for (int i = 0; i < (int)constructorInfoArray.Length; i++) { if (PlatformTypeHelper.IsAccessibleConstructor(constructorInfoArray[i])) { num++; } } } if (num != this.constructors.Count) { flag = false; } } } if (!this.members.Refresh()) { flag = false; } if (flag && (typeId != this.baseType || typeId1 != this.itemType || typeId2 != this.nullableType)) { flag = false; } if (flag && (propertyId != this.nameProperty || propertyId1 != this.defaultContentProperty)) { flag = false; } if (flag && ProjectContextType.GetTypeConverterId(typeConverter) != ProjectContextType.GetTypeConverterId(this.typeConverter)) { flag = false; } if (flag && this.constructorArgumentProperties != null) { IConstructorArgumentProperties constructorArgumentProperties = PlatformTypeHelper.GetConstructorArgumentProperties(this); if (constructorArgumentProperties.Count == this.constructorArgumentProperties.Count) { foreach (string constructorArgumentProperty in constructorArgumentProperties) { if (constructorArgumentProperties[constructorArgumentProperty] == this.constructorArgumentProperties[constructorArgumentProperty]) { continue; } flag = false; break; } } else { flag = false; } } return(flag); }