C# Class Admin.Service.MicroServices.Products.Domain.Product

Inheritance: Aggregate
Datei anzeigen Open project: rbanks54/microcafe Class Usage Examples

Public Methods

Method Description
ChangeDescription ( string newDescription, int originalVersion ) : void
ChangeName ( string newName, int originalVersion ) : void
ChangePrice ( decimal newPrice, int originalVersion ) : void
Product ( System.Guid id, string name, string description, decimal price ) : System
ValidateName ( string name ) : void
ValidateVersion ( int version ) : void

Private Methods

Method Description
Apply ( ProductCreated e ) : void
Apply ( ProductDescriptionChanged e ) : void
Apply ( ProductNameChanged e ) : void
Apply ( ProductPriceChanged e ) : void
Product ( ) : System

Method Details

ChangeDescription() public method

public ChangeDescription ( string newDescription, int originalVersion ) : void
newDescription string
originalVersion int
return void

ChangeName() public method

public ChangeName ( string newName, int originalVersion ) : void
newName string
originalVersion int
return void

ChangePrice() public method

public ChangePrice ( decimal newPrice, int originalVersion ) : void
newPrice decimal
originalVersion int
return void

Product() public method

public Product ( System.Guid id, string name, string description, decimal price ) : System
id System.Guid
name string
description string
price decimal
return System

ValidateName() public method

public ValidateName ( string name ) : void
name string
return void

ValidateVersion() public method

public ValidateVersion ( int version ) : void
version int
return void