Skip to content

Instantly share code, notes, and snippets.

@rmaziarka
Last active December 29, 2017 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save rmaziarka/6ddb02f3b2380b200dee5d54d76aedb0 to your computer and use it in GitHub Desktop.
Save rmaziarka/6ddb02f3b2380b200dee5d54d76aedb0 to your computer and use it in GitHub Desktop.
public class ProductAddedEvent : INotification
{
public ProductAddedEvent(int id, string name, int categoryId)
{
Id = id;
Name = name;
CategoryId = categoryId;
}
public int Id { get; }
public string Name { get; }
public int CategoryId { get; }
}
public class ReviewAddedEvent : INotification
{
public ReviewAddedEvent(int id, int productId, float rating)
{
Id = id;
ProductId = productId;
Rating = rating;
}
public int Id { get; }
public int ProductId { get; }
public float Rating { get; }
}
public class OrderCompletedEvent : INotification
{
public OrderCompletedEvent(int id, int productId, int amount)
{
Id = id;
ProductId = productId;
Amount = amount;
}
public int Id { get; }
public int ProductId { get; }
public int Amount { get; }
}
public class FieldValueChangedEvent : INotification
{
public FieldValueChangedEvent(int id, int productId, object value)
{
Id = id;
ProductId = productId;
Value = value;
}
public int Id { get; }
public int ProductId { get; }
public object Value { get; }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment