< Summary

Information
Class: ImpromptuInterface.AliasAttribute
Assembly: ImpromptuInterface
File(s): /home/runner/work/impromptu-interface/impromptu-interface/ImpromptuInterface/src/Attributes/AliasAttribute.cs
Line coverage
100%
Covered lines: 4
Uncovered lines: 0
Coverable lines: 4
Total lines: 36
Line coverage: 100%
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%11100%
get_Name()100%11100%

File(s)

/home/runner/work/impromptu-interface/impromptu-interface/ImpromptuInterface/src/Attributes/AliasAttribute.cs

#LineLine coverage
 1using System;
 2
 3namespace ImpromptuInterface
 4{
 5    /// <summary>
 6    /// Alias to swap method/property/event call name invoked on original
 7    /// </summary>
 8    [AttributeUsage(System.AttributeTargets.Method
 9                    | System.AttributeTargets.Property
 10                    | System.AttributeTargets.Event )]
 11    public class AliasAttribute : Attribute
 12    {
 13        private string _name;
 14
 15        /// <summary>
 16        /// Initializes a new instance of the <see cref="AliasAttribute" /> class.
 17        /// </summary>
 18        /// <param name="name">The name.</param>
 319        public AliasAttribute(string name)
 20        {
 321            _name = name;
 322        }
 23
 24        /// <summary>
 25        /// Gets or sets the name.
 26        /// </summary>
 27        /// <value>
 28        /// The name.
 29        /// </value>
 30        public string Name
 31        {
 332            get { return _name; }
 33
 34        }
 35    }
 36}

Methods/Properties

.ctor(System.String)
get_Name()