Giter Site home page Giter Site logo

hlinteractive / hli.core Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 161 KB

Base Model for DDD / MVVM and other common classes and utilities

Home Page: http://www.hlinteractive.se/

License: GNU General Public License v3.0

C# 100.00%
mvvm modelbase dotnet dotnetcore netstandard multi-target

hli.core's Introduction

HL Interactive

HL Interactive (HLi)

Table of contents generated with markdown-toc

HLI.Core

ModelBase class and other common C# code.

NuGet Downloads Build Status VSTS

Usage

Installation

Download the nuget package through Package Manager Console:

install-package HLI.Core

You can also clone the package on GitHub:

Model Base

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 properties
    • Created: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

Extensions

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 or Expression

Other

Other nifty code to keep you going:

  • DateTimeSpan - because it's missing from .Net

Delivery & Deployment

Download the nuget package through Package Manager Console:

install-package HLI.Forms.Core

Dependencies

  • Projects
  • Packages
    • Newtonsoft.Json
  • Tools
    • Windows 8.1 SDK
    • Windows 10 SDK

NuGet Package Generation

The project is configured to automatically generate a *.nupkg upon build using Visual Studio 2017 CsProj MSBuild.

Solution File Structure

  • 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's People

Contributors

thomashagstrom avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.