示例#1
0
 /// <summary>
 /// Construct a <see cref="LogEventProperty"/> from an existing <see cref="EventProperty"/> instance.
 /// </summary>
 /// <param name="property">The existing property.</param>
 /// <exception cref="ArgumentException"></exception>
 /// <exception cref="ArgumentNullException"></exception>
 internal LogEventProperty(EventProperty property)
 {
     if (property.Equals(EventProperty.None))
     {
         throw new ArgumentNullException(nameof(property));
     }
     Name  = property.Name;
     Value = property.Value;
 }
 /// <summary>Indicates whether this instance and a specified <see cref="EventProperty"/> are equal.</summary>
 /// <param name="other">The <see cref="EventProperty"/> to compare with the current instance. </param>
 /// <returns>
 /// <see langword="true" /> if <paramref name="other" /> and this instance represent the same value; otherwise, <see langword="false" />. </returns>
 public bool Equals(EventProperty other)
 {
     return(string.Equals(Name, other.Name) && Equals(Value, other.Value));
 }