コード例 #1
0
        static IEnumerable <IMetadataField> GetInstanceFieldsOfType(this IMetadataTypeInfo type, Type fieldType)
        {
            var metadataFields = type.GetInstanceFields();
            var fields         = metadataFields.Where(x => x.Type is IMetadataClassType);

            return(fields.Where(x => (((IMetadataClassType)x.Type).Type.FullyQualifiedName == fieldType.FullName)));
        }
        private static IEnumerable <IMetadataField> GetInstanceFieldsOfType(this IMetadataTypeInfo type, string fullyQualifiedName)
        {
            var metadataFields = type.GetInstanceFields();
            var fields         = metadataFields.Where(x => x.Type is IMetadataClassType);

            return(fields.Where(x => (((IMetadataClassType)x.Type).Type.HasCustomAttribute(fullyQualifiedName))));
        }