internal void deployDescriptor(Type type, IFileDataStructure dataStructure) { //Type type = dataStructure.GetType(); fileStructureAttribute attribute = Attribute.GetCustomAttribute(type, typeof(fileStructureAttribute)) as fileStructureAttribute; if (attribute != null) { deployDescriptorBase(type, attribute, dataStructure); } var properties = type.GetProperties(BindingFlags.Instance | BindingFlags.Public | BindingFlags.SetProperty); foreach (var prop in properties) { fileDataAttribute propAttribute = Attribute.GetCustomAttribute(prop, typeof(fileDataAttribute)) as fileDataAttribute; if (propAttribute != null) { fileDataPropertyDescriptor propDescriptor = new fileDataPropertyDescriptor(prop, propAttribute, dataStructure); Int32 p = propDescriptor.memberMetaInfo.priority; while (fileDataProperties.ContainsKey(p)) { p++; } fileDataProperties.Add(p, propDescriptor); } } }
internal void deployDescriptor(PropertyInfo memberInfo, fileDataAttribute attribute, Object instance) { deployDescriptorBase(memberInfo, attribute, instance); }
// public fileDataPropertyMode mode { get; protected set; } = fileDataPropertyMode.autoTextOrXml; public fileDataPropertyDescriptor(PropertyInfo memberInfo, fileDataAttribute attribute, Object instance) { deployDescriptor(memberInfo, attribute, instance); }