From 20b9485f2c346c73eed79805e0b58c51eb860444 Mon Sep 17 00:00:00 2001 From: Aptivi CEO Date: Tue, 8 Oct 2024 22:42:50 +0300 Subject: [PATCH] imp - Close the PropertyInfo property setters --- These were not intended to be used. --- Type: imp Breaking: False Doc Required: False Backport Required: False Part: 1/1 --- VisualCard/Parsers/Arguments/PropertyInfo.cs | 44 +++++++------------- 1 file changed, 16 insertions(+), 28 deletions(-) diff --git a/VisualCard/Parsers/Arguments/PropertyInfo.cs b/VisualCard/Parsers/Arguments/PropertyInfo.cs index fbc31e2..775a700 100644 --- a/VisualCard/Parsers/Arguments/PropertyInfo.cs +++ b/VisualCard/Parsers/Arguments/PropertyInfo.cs @@ -32,46 +32,34 @@ namespace VisualCard.Parsers.Arguments [DebuggerDisplay("Property: {Arguments.Length} args, {Prefix} [G: {Group}] = {Value}")] public class PropertyInfo : IEquatable { - private string rawValue = ""; - private string prefix = ""; - private string group = ""; - private ArgumentInfo[] arguments = []; + private readonly string rawValue = ""; + private readonly string prefix = ""; + private readonly string group = ""; + private readonly ArgumentInfo[] arguments = []; /// /// Raw value /// - public string Value - { - get => rawValue; - set => rawValue = value; - } + public string Value => + rawValue; /// /// Property prefix /// - public string Prefix - { - get => prefix; - set => prefix = value; - } + public string Prefix => + prefix; /// /// Property group /// - public string Group - { - get => group; - set => group = value; - } + public string Group => + group; /// /// Argument info instances. It includes AltId, type, and value /// - public ArgumentInfo[] Arguments - { - get => arguments; - set => arguments = value; - } + public ArgumentInfo[] Arguments => + arguments; /// /// Checks to see if both the property info instances are equal @@ -145,10 +133,10 @@ internal PropertyInfo(string line) prefix = xNonstandard ? VcardConstants._xSpecifier : prefix; // Install values - Value = value; - Prefix = prefix; - Arguments = finalArgs; - Group = group; + this.rawValue = value; + this.prefix = prefix; + this.arguments = finalArgs; + this.group = group; } } }