private IEnumerable<SQLiteConnection.ColumnInfo> GetExpectedColumnInfos(IReflectionService reflectionService, Type type)
        {
            var expectedValues = from prop in reflectionService.GetPublicInstanceProperties(type)
                                 select new SQLiteConnection.ColumnInfo
                                 {
                                     Name = prop.Name,
                                     notnull = ((!prop.GetCustomAttributes<NotNullAttribute>(true).Any()) && (!prop.GetCustomAttributes<PrimaryKeyAttribute>(true).Any())) ? 0 : 1
                                 };

            return expectedValues;
        }
示例#2
0
        private IEnumerable <SQLiteConnection.ColumnInfo> GetExpectedColumnInfos(IReflectionService reflectionService, Type type)
        {
            var expectedValues = from prop in reflectionService.GetPublicInstanceProperties(type)
                                 select new SQLiteConnection.ColumnInfo
            {
                Name    = prop.Name,
                notnull = ((!prop.GetCustomAttributes <NotNullAttribute>(true).Any()) && (!prop.GetCustomAttributes <PrimaryKeyAttribute>(true).Any())) ? 0 : 1
            };

            return(expectedValues);
        }
示例#3
0
        //
        // Constructor

        public TableMappingBridge(TableMapping tableMapping, IReflectionService reflectionService)
        {
            TableMapping = tableMapping;

            Properties = reflectionService.GetPublicInstanceProperties(tableMapping.MappedType);
        }