//------------------------------------------------------------------------------
// <auto-generated>
// This code was generated by a tool.
// Tango Observables Generator
//
// Changes to this file may cause incorrect behavior and will be lost if
// the code is regenerated. Do not modify!
// </auto-generated>
//------------------------------------------------------------------------------
using System.Collections.ObjectModel;
using System.ComponentModel;
using Tango.BL.Entities;
namespace Tango.BL
{
public partial class @(Model.Name)
{
@foreach (var prop in Model.Properties)
{
<div>
private @(prop.Type) _@(prop.Name.ToLower());
/// <summary>
/// Gets or sets the @(prop.Name).
/// </summary>
public @(prop.Type) @(prop.Name)
{
get { return _@(prop.Name.ToLower()); }
set { _@(prop.Name.ToLower()) = value; RaisePropertyChanged(nameof(@(prop.Name))); }
}
private ICollectionView _@(prop.Name.ToLower())ViewSource;
/// <summary>
/// Gets or sets the @(prop.Name) View Source.
///</summary>
public ICollectionView @(prop.Name)ViewSource
{
get { return _@(prop.Name.ToLower())ViewSource; }
set { _@(prop.Name.ToLower())ViewSource = value; RaisePropertyChanged(nameof(@(prop.Name)ViewSource)); }
}
</div>
}
/// <summary>
/// Initialize collection sources.
/// </summary>
private void InitCollectionSources()
{
@foreach (var prop in Model.Properties)
{
<div>
@(prop.Name)ViewSource = CreateCollectionView(@(prop.Name));
</div>
}
}
}
}