//------------------------------------------------------------------------------ // // 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! // //------------------------------------------------------------------------------ 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) {
private @(prop.Type) _@(prop.Name.ToLower()); /// /// Gets or sets the @(prop.Name). /// 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; /// /// Gets or sets the @(prop.Name) View Source. /// public ICollectionView @(prop.Name)ViewSource { get { return _@(prop.Name.ToLower())ViewSource; } set { _@(prop.Name.ToLower())ViewSource = value; RaisePropertyChanged(nameof(@(prop.Name)ViewSource)); } }
} /// /// Initialize collection sources. /// public void InitCollectionSources() { @foreach (var prop in Model.Properties) {
@(prop.Name)ViewSource = CreateCollectionView(@(prop.Name));
} } } }