-
-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7e7d266
commit 3a3f459
Showing
11 changed files
with
182 additions
and
48 deletions.
There are no files selected for viewing
12 changes: 8 additions & 4 deletions
12
Src/Sxc.Tests/ToSic.Sxc.Tests/DataTests/ModelTests/DataModelAnalyzerTestAccessors.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using ToSic.Sxc.Data.Models; | ||
|
||
// ReSharper disable once CheckNamespace | ||
namespace Custom.Data; | ||
|
||
/// <summary> | ||
/// Base class for custom models. Similar to <see cref="CustomItem"/> but without predefined public properties or methods. | ||
/// </summary> | ||
/// <remarks> | ||
/// This is a lightweight custom object which doesn't have public properties | ||
/// like `Id` or methods such as `String(...)`. | ||
/// | ||
/// It's ideal for data models which need full control, | ||
/// like for serializing or just to reduce the API surface. | ||
/// | ||
/// You can access the underlying (protected) `_item` property to get the raw data. | ||
/// And it also has the (protected) `As<...>()` conversion for typed sub-properties. | ||
/// | ||
/// History: New in 19.03 | ||
/// </remarks> | ||
[PublicApi] | ||
[ModelSource(ContentTypes = "*")] | ||
public class CustomModel: ModelFromItem; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.