Skip to content

Instantly share code, notes, and snippets.

@grimorde
Last active July 30, 2020 08:36
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 grimorde/60589471c7d30c8cf77068fdbdc5a384 to your computer and use it in GitHub Desktop.
Save grimorde/60589471c7d30c8cf77068fdbdc5a384 to your computer and use it in GitHub Desktop.
Media Asset class
using System.ComponentModel;
using System.Runtime.CompilerServices;
using MyWandle.Core.Enums;
namespace MyApp.Core.Models
{
public class MediaAsset : INotifyPropertyChanged
{
private bool _isSelected;
public string Id { get; set; }
public string Name { get; set; }
public MediaAssetType Type { get; set; }
public string PreviewPath { get; set; }
public string Path { get; set; }
public bool IsSelected
{
get => _isSelected;
set
{
if (Equals(value, _isSelected))
{
return;
}
_isSelected = value;
OnPropertyChanged();
}
}
public event PropertyChangedEventHandler PropertyChanged;
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment