< Summary

Information
Class: MyNet.Messaging.PropertyChangedMessageBase
Assembly: MyNet.Messaging
File(s): https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.Messaging/PropertyChangedMessageBase.cs
Tag: 323_28699572109
Line coverage
0%
Covered lines: 0
Uncovered lines: 3
Coverable lines: 3
Total lines: 50
Line coverage: 0%
Branch coverage
N/A
Covered branches: 0
Total branches: 0
Branch coverage: N/A
Method coverage

Feature is only available for sponsors

Upgrade to PRO version

Metrics

MethodBranch coverage Crap Score Cyclomatic complexity Line coverage
.ctor(...)100%210%
.ctor(...)100%210%
.ctor(...)100%210%

File(s)

https://raw.githubusercontent.com/sandre58/MyNet/85372080fe102cd9ee155ceab49ae000e7f66103/src/MyNet.Messaging/PropertyChangedMessageBase.cs

#LineLine coverage
 1// -----------------------------------------------------------------------
 2// <copyright file="PropertyChangedMessageBase.cs" company="Stéphane ANDRE">
 3// Copyright (c) Stéphane ANDRE. All rights reserved.
 4// </copyright>
 5// -----------------------------------------------------------------------
 6
 7namespace MyNet.Messaging;
 8
 9/// <summary>
 10/// Basis class for the <see cref="PropertyChangedMessage{T}" /> class. This
 11/// class allows a recipient to register for all PropertyChangedMessages without
 12/// having to specify the type T.
 13/// </summary>
 14public abstract class PropertyChangedMessageBase : MessageBase
 15{
 16    /// <summary>
 17    /// Initializes a new instance of the <see cref="PropertyChangedMessageBase" /> class.
 18    /// </summary>
 19    /// <param name="sender">The message's sender.</param>
 20    /// <param name="propertyName">The name of the property that changed.</param>
 21    protected PropertyChangedMessageBase(object sender, string propertyName)
 022        : base(sender) => PropertyName = propertyName;
 23
 24    /// <summary>
 25    /// Initializes a new instance of the <see cref="PropertyChangedMessageBase" /> class.
 26    /// </summary>
 27    /// <param name="sender">The message's sender.</param>
 28    /// <param name="target">The message's intended target. This parameter can be used
 29    /// to give an indication as to whom the message was intended for. Of course
 30    /// this is only an indication, amd may be null.</param>
 31    /// <param name="propertyName">The name of the property that changed.</param>
 32    protected PropertyChangedMessageBase(object sender, object target, string propertyName)
 033        : base(sender, target) => PropertyName = propertyName;
 34
 35    /// <summary>
 36    /// Initializes a new instance of the <see cref="PropertyChangedMessageBase" /> class.
 37    /// </summary>
 38    /// <param name="propertyName">The name of the property that changed.</param>
 039    protected PropertyChangedMessageBase(string propertyName) => PropertyName = propertyName;
 40
 41    /// <summary>
 42    /// Gets or sets the name of the property that changed.
 43    /// </summary>
 44    public string PropertyName
 45    {
 46        get;
 47        protected set;
 48    }
 49}
 50