コード例 #1
0
        public static ReadOnlyArray <ElementProperty <OpenXmlElement> > GetElements(PackageCache cache, Type type)
        {
            SchemaIndex GetSchema(PropertyInfo property)
            {
                var index  = property.GetCustomAttribute <IndexAttribute>();
                var schema = cache.GetElementTypeInfo(property.PropertyType).Schema;

                return(new SchemaIndex(schema, index));
            }

            return(ElementPropertyCollection <OpenXmlElement> .GetProperties(cache, type, GetSchema));
        }
コード例 #2
0
 private ReadOnlyArray <ElementProperty <OpenXmlSimpleType> > CreateAttributes(Type type) => ElementPropertyCollection <OpenXmlSimpleType> .GetProperties(this, type);