HL Interactive (HLi)
Table of contents generated with markdown-toc
ModelBase class and other common C# code.
Download the nuget package through Package Manager Console:
install-package HLI.Core
You can also clone the package on GitHub:
For business objects / models; inherit one of the base classes:
- ModelBase - inherits AuditedObject and implements change tracking, notification, filtering. This gives a complete model with little effort. Inherits all of the below.
- AuditedObject -
IObjectWithAudit
implementation that inherits EditableObject. Provides base propertiesCreated:DateTime
Updated:DateTime
Version:int
Id:Guid
- NotificationObject:
INotifyPropertyChanged
implementation with SetProperty methods - EditableObject -
IEditableObject
implementation allowing change tracking by calling BeginEdit, CancelEdit and EndEdit
Common portable extensions to avoid code copy (i.e re-inventing the wheel).
- EnumerableExtensions - IndexOf method accepting an object
- ExpressionExtensions - ToPropertyName method acccepting an
Expression
- ObjectExtensions - provides the following methods:
- StreamToByte accepting an
Stream
- DeepClone accepting an
object
- GetValueForProperty accepting a property name by
string
orExpression
- StreamToByte accepting an
Other nifty code to keep you going:
- DateTimeSpan - because it's missing from .Net
Download the nuget package through Package Manager Console:
install-package HLI.Forms.Core
- Projects
- Packages
- Newtonsoft.Json
- Tools
- Windows 8.1 SDK
- Windows 10 SDK
The project is configured to automatically generate a *.nupkg upon build using Visual Studio 2017 CsProj MSBuild.
- HLI.Core - solution root directory
- HLI.Core (Portable) - main project
- Extensions - common extensions to .Net classes
- Interfaces - interfaces used by project
- Models - model interfaces
- Repositories - repository pattern interfaces
- Models - base models to simplify validation, serialization, change tracking etc.
- HLI.Core.Tests - unit tests (MS Test)
- Mocks
- HLI.Core (Portable) - main project