Last active
July 30, 2020 08:36
-
-
Save grimorde/60589471c7d30c8cf77068fdbdc5a384 to your computer and use it in GitHub Desktop.
Media Asset class
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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