Skip to content

Commit

Permalink
ref - ValueInfo properties are no longer virtual
Browse files Browse the repository at this point in the history
---

All properties and fields of ValueInfo are no longer marked as virtual,
hence the refactor.

---

Type: ref
Breaking: False
Doc Required: False
Backport Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Nov 9, 2024
1 parent 614ef0b commit 949bffd
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions VisualCard/Parts/ValueInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,22 +34,22 @@ public class ValueInfo<TValue> : IEquatable<ValueInfo<TValue>>
/// <summary>
/// Property information containing details about this property that this class instance was created from
/// </summary>
public virtual PropertyInfo? Property { get; internal set; }
public PropertyInfo? Property { get; internal set; }

/// <summary>
/// Alternative ID. -1 if unspecified.
/// </summary>
public virtual int AltId { get; internal set; }
public int AltId { get; internal set; }

/// <summary>
/// Card element type (home, work, ...)
/// </summary>
public virtual string[] ElementTypes { get; internal set; } = [];
public string[] ElementTypes { get; internal set; } = [];

/// <summary>
/// Value type (usually set by VALUE=)
/// </summary>
public virtual string ValueType { get; internal set; } = "";
public string ValueType { get; internal set; } = "";

/// <summary>
/// Property group
Expand All @@ -64,9 +64,9 @@ public class ValueInfo<TValue> : IEquatable<ValueInfo<TValue>>
Property?.NestedGroups ?? [];

/// <summary>
/// Value
/// Parsed value
/// </summary>
public virtual TValue Value { get; internal set; }
public TValue Value { get; internal set; }

/// <summary>
/// Is this part preferred?
Expand Down Expand Up @@ -146,7 +146,7 @@ public override int GetHashCode()
public static bool operator !=(ValueInfo<TValue> left, ValueInfo<TValue> right) =>
!(left == right);

internal virtual bool EqualsInternal(ValueInfo<TValue> source, ValueInfo<TValue> target) =>
internal bool EqualsInternal(ValueInfo<TValue> source, ValueInfo<TValue> target) =>
true;

internal ValueInfo(PropertyInfo? property, int altId, string[] elementTypes, string valueType, TValue? value)
Expand Down

0 comments on commit 949bffd

Please sign in to comment.