@@ -43,6 +43,60 @@ public AttributeDictionary(): base(StringComparer.OrdinalIgnoreCase) { }
4343 return String . IsNullOrWhiteSpace ( value ) ? null : value ;
4444 }
4545
46+ /*==========================================================================================================================
47+ | METHOD: GET BOOLEAN VALUE
48+ \-------------------------------------------------------------------------------------------------------------------------*/
49+ /// <summary>
50+ /// Gets an attribute value as a Boolean from the <see cref="AttributeDictionary"/> based on the <paramref name="
51+ /// attributeKey"/>.
52+ /// </summary>
53+ /// <param name="attributeKey">The string identifier for the <see cref="AttributeRecord"/>.</param>
54+ /// <returns>The value for the attribute as a boolean.</returns>
55+ public bool ? GetBoolean ( string attributeKey ) => AttributeValueConverter . Convert < bool ? > ( GetValue ( attributeKey ) ) ;
56+
57+ /*==========================================================================================================================
58+ | METHOD: GET INTEGER
59+ \-------------------------------------------------------------------------------------------------------------------------*/
60+ /// <summary>
61+ /// Gets an attribute value as an integer from the <see cref="AttributeDictionary"/> based on the <paramref name="
62+ /// attributeKey"/>.
63+ /// </summary>
64+ /// <param name="attributeKey">The string identifier for the <see cref="AttributeRecord"/>.</param>
65+ /// <returns>The value for the attribute as an integer.</returns>
66+ public int ? GetInteger ( string attributeKey ) => AttributeValueConverter . Convert < int ? > ( GetValue ( attributeKey ) ) ;
67+
68+ /*==========================================================================================================================
69+ | METHOD: GET DOUBLE
70+ \-------------------------------------------------------------------------------------------------------------------------*/
71+ /// <summary>
72+ /// Gets an attribute value as a double from the <see cref="AttributeDictionary"/> based on the <paramref name="
73+ /// attributeKey"/>.
74+ /// </summary>
75+ /// <param name="attributeKey">The string identifier for the <see cref="AttributeRecord"/>.</param>
76+ /// <returns>The value for the attribute as a double.</returns>
77+ public double ? GetDouble ( string attributeKey ) => AttributeValueConverter . Convert < double ? > ( GetValue ( attributeKey ) ) ;
78+
79+ /*==========================================================================================================================
80+ | METHOD: GET DATETIME
81+ \-------------------------------------------------------------------------------------------------------------------------*/
82+ /// <summary>
83+ /// Gets an attribute value as a date/time from the <see cref="AttributeDictionary"/> based on the <paramref name="
84+ /// attributeKey"/>.
85+ /// </summary>
86+ /// <param name="attributeKey">The string identifier for the <see cref="AttributeRecord"/>.</param>
87+ /// <returns>The value for the attribute as a DateTime object.</returns>
88+ public DateTime ? GetDateTime ( string attributeKey ) => AttributeValueConverter . Convert < DateTime ? > ( GetValue ( attributeKey ) ) ;
89+
90+ /*==========================================================================================================================
91+ | METHOD: GET URI
92+ \-------------------------------------------------------------------------------------------------------------------------*/
93+ /// <summary>
94+ /// Gets an attribute value as a URI from the <see cref="AttributeDictionary"/> based on the <paramref name="attributeKey
95+ /// "/>.
96+ /// </summary>
97+ /// <param name="attributeKey">The string identifier for the <see cref="AttributeRecord"/>.</param>
98+ /// <returns>The value for the attribute as a Uri object.</returns>
99+ public Uri ? GetUri ( string attributeKey ) => AttributeValueConverter . Convert < Uri ? > ( GetValue ( attributeKey ) ) ;
46100
47101 } //Class
48102} //Namespace
0 commit comments