<commit_before>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Vendord.Desktop.WPF.App.DataAccess;
using Vendord.Desktop.WPF.App.Model;

namespace Vendord.Desktop.WPF.App.ViewModel
{
    public class ProductViewModel : WorkspaceViewModel
    {
        #region Fields

        readonly Product _product;
        readonly ProductRepository _productRepository;
        bool _isSelected;

        #endregion // Fields

        #region Constructor

        public ProductViewModel(Product product, ProductRepository productRepository)
        {
            if (product == null)
                throw new ArgumentNullException("product");

            if (productRepository == null)
                throw new ArgumentNullException("productRepository");

            _product = product;
            _productRepository = productRepository;
        }

        #endregion // Constructor

        #region Product Properties

        public string Upc { get; set; }
        public string Name { get; set; }

        #endregion // Product Properties

        #region Presentation Properties

        /// <summary>
        /// Gets/sets whether this customer is selected in the UI.
        /// </summary>
        public bool IsSelected
        {
            get { return _isSelected; }
            set<commit_msg>Fix properties.<commit_after>﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Vendord.Desktop.WPF.App.DataAccess;
using Vendord.Desktop.WPF.App.Model;

namespace Vendord.Desktop.WPF.App.ViewModel
{
    public class ProductViewModel : WorkspaceViewModel
    {
        #region Fields

        readonly Product _product;
        readonly ProductRepository _productRepository;
        bool _isSelected;

        #endregion // Fields

        #region Constructor

        public ProductViewModel(Product product, ProductRepository productRepository)
        {
            if (product == null)
                throw new ArgumentNullException("product");

            if (productRepository == null)
                throw new ArgumentNullException("productRepository");

            _product = product;
            _productRepository = productRepository;
        }

        #endregion // Constructor

        #region Product Properties

        public long Upc 
        {
            get { return _product.Upc; }
            set
            {
                if (value == _product.Upc)
                    return;

                _product.Upc = value;

                base.OnPropertyChanged("Upc");
            }
        }
        public string Name 
        {
            get { return _product.Name; }
            set
            {
                if (value == _product.Name)
                    return;

                _product.Name = value;

                base.OnPropertyChanged("Name");
            }
        }

        #endregion // Product Properties

        #region Presentation Properties

        /// <summary>
        /// Gets/sets whether this customer is selected in the UI.
        /// </summary>
        public bool IsSelected
        {
            get { return _isSelected; }
            set
{'fraction_non_alphanumeric': 0.07487468671679198, 'fraction_numerical': 0.0, 'mean_word_length': 1.7174468085106382, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5561975', 'n_tokens_mistral': 786, 'n_tokens_neox': 733, 'n_words': 202}