Skip to content

Commit

Permalink
Merge pull request #82 from TortugaResearch/Anchor-4.1
Browse files Browse the repository at this point in the history
Anchor 4.1
  • Loading branch information
Grauenwolf authored Jul 9, 2022
2 parents 4b62d34 + 7025c36 commit 9c08ca4
Show file tree
Hide file tree
Showing 318 changed files with 5,748 additions and 2,586 deletions.
9 changes: 5 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
# Tortuga Anchor
Data Modeling Library in .NET
Data Modeling Library for .NET

## Documentation

* [Documentation Website](https://tortugaresearch.github.io/Anchor/)
* [API Reference](http://tortugaresearch.github.io/Anchor/API/Index.html)
* [Anchor Wiki](https://github.com/tortugaresearch/Anchor/wiki)
* [Documentation Website](https://tortugaresearch.github.io/Tortuga.Anchor/)
* [API Reference](http://tortugaresearch.github.io/Tortuga.Anchor/API/Index.html)
* [Anchor Wiki](https://github.com/TortugaResearch/Tortuga.Anchor/wiki)
* The [change log](Tortuga.Anchor/Changelog.md) starts with version 4.0.

## What does your entity base class really give you?

Expand Down
24 changes: 24 additions & 0 deletions Tortuga.Anchor/.editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,13 @@ csharp_style_deconstructed_variable_declaration = true:suggestion
csharp_style_var_for_built_in_types = false:suggestion
csharp_style_var_when_type_is_apparent = false:suggestion
csharp_style_var_elsewhere = false:suggestion
csharp_indent_labels = one_less_than_current
csharp_style_expression_bodied_indexers = true:silent
csharp_style_expression_bodied_accessors = true:silent
csharp_style_expression_bodied_lambdas = true:silent
csharp_style_expression_bodied_local_functions = false:silent
csharp_style_throw_expression = true:suggestion
csharp_style_prefer_null_check_over_type_check = true:suggestion

[*.{cs,vb}]
dotnet_diagnostic.CA5394.severity=silent
Expand Down Expand Up @@ -79,3 +86,20 @@ csharp_style_var_elsewhere = false:none

# IDE0008: Use explicit type
csharp_style_var_when_type_is_apparent = false:none
end_of_line = crlf
dotnet_style_coalesce_expression = true:suggestion
dotnet_style_null_propagation = true:suggestion
dotnet_style_prefer_is_null_check_over_reference_equality_method = true:suggestion
dotnet_style_prefer_auto_properties = true:silent
dotnet_style_object_initializer = true:suggestion
dotnet_style_collection_initializer = true:suggestion
dotnet_style_prefer_simplified_boolean_expressions = true:suggestion
dotnet_style_prefer_conditional_expression_over_assignment = true:silent
dotnet_style_prefer_conditional_expression_over_return = true:silent
dotnet_style_explicit_tuple_names = true:suggestion
dotnet_style_prefer_inferred_tuple_names = true:suggestion
dotnet_style_prefer_inferred_anonymous_type_member_names = true:suggestion
dotnet_style_prefer_compound_assignment = true:suggestion
dotnet_style_prefer_simplified_interpolation = true:suggestion
dotnet_style_namespace_match_folder = true:suggestion
indent_style = tab
58 changes: 58 additions & 0 deletions Tortuga.Anchor/Changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
## Version 4.1


### Features

[#77 PropertyMetadata should cache attributes](https://github.com/TortugaResearch/Tortuga.Anchor/issues/77)

All attributes are now being cached by the `PropertyMetadata`.

We still have dedicated attribute lists for performance senstive areas like validation.

[#78 Expose the PropertyInfo class from the PropertyMetadata class](https://github.com/TortugaResearch/Tortuga.Anchor/issues/78)

This is basically an 'esacpe hatch' for when someone needs additional information not exposed via the `PropertyMetadata`.

[#74 ConstructorMetadataCollection needs a DefaultConstructor property](https://github.com/TortugaResearch/Tortuga.Anchor/issues/74)

We often need to grab the default constructor. A lot of code in Chain duplicates this search, which is silly because the `ConstructorMetadataCollection` already knows that the constructor exists.


### Bug Fixes

[#76 Test attribute inheritance on properties](https://github.com/TortugaResearch/Tortuga.Anchor/issues/76)

If a property is virtual, and overriden by a subclass, the attributes on the base class's property were not being acknowledged up by the subclass.

[#70 Column attribute doesn't handle missing column name](https://github.com/TortugaResearch/Tortuga.Anchor/issues/70)

It is possible to construct a `Column` attribute in a way where it doesn't have a column name. This happens when you need to override another column-related value.



## Version 4.0

**Breaking Change** `PropertyMetadata.CanRead` and `PropertyMetadata.CanWrite` were incorrectly returning true for protected properties. It has been fixed to only return true for properties that are actually public. #61

To determine if you can read or write to protected/private properties, use one of:

* `CanReadRestricted`
* `CanReadIndexedAndRestricted`
* `CanWriteRestricted`
* `CanWriteIndexedAndRestricted`

To actually perform the read or write, use `InvokeGet` and `InvokeSet`.

`ClassMetadata.ColumnsFor` has been affected by this change.

**Feature** A `MetadataCache.Clone` method has been added. The purpose of this is to make it easier to implement a clone method on a class. #28

**Feature** CollectionUtilities.BatchAsSegments is a lightweight LINQ batcher. #36

In order to avoid memory allocations, this uses a `ReadOnlyListSegment` struct.

For more information on these changes, see these blog posts.

* [Anchor 4 Breaking Changes](https://tortugaresearch.com/anchor-4-breaking-changes/)
* [Allocation-free Batching in Anchor 4](https://tortugaresearch.com/allocation-free-batching-in-anchor-4/)
* [Supporting Clone with Anchor 4](https://tortugaresearch.com/supporting-clone-with-anchor-4/)
Loading

0 comments on commit 9c08ca4

Please sign in to comment.