/
n1kolas
/
NoteCreator
Обзор
Документация
Войти
/
n1kolas
/
NoteCreator
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
Data/Models/Note.cs
57 строк
2 KB
Nicolai
Fixed some warnings
07 окт 2025, 00:53
07 окт 2025, 00:53
0031691
Код
Авторство
О чём код?
using System; using System.Collections.Generic; using System.ComponentModel; using System.DirectoryServices.ActiveDirectory; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows.Documents; namespace LogIn.Data.Models { public class Note : INotifyPropertyChanged { public event PropertyChangedEventHandler? PropertyChanged; protected void OnPropertyChanged(string propertyName) { PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName)); } public Note(int id, int userId, string noteName, string content) { Id = id; UserId = userId; _noteName = noteName ?? throw new ArgumentNullException(nameof(noteName)); _content = content ?? throw new ArgumentNullException(nameof(content)); } public int Id { get; set; } public int UserId { get; set; } private string _noteName; public string NoteName { get => _noteName; set { if (_noteName != value) { _noteName = value; OnPropertyChanged(nameof(NoteName)); } } } private string _content; public string Content { get => _content; set { if (_content != value) { _content = value; OnPropertyChanged(nameof(Content)); } } } } }