2 * Copyright(c) 2023 Samsung Electronics Co., Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
19 using System.ComponentModel;
22 namespace Tizen.NUI.BaseComponents
25 /// TextMapHelper converts PropertyMap to struct and struct to PropertyMap.
27 [EditorBrowsable(EditorBrowsableState.Never)]
28 public static class TextMapHelper
31 /// It returns a string value according to FontWidthType.
32 /// The returned value can be used for FontStyle PropertyMap.
33 /// <param name="fontWidthType">The FontWidthType enum value.</param>
34 /// <returns> A string value for FontStyle.Width property. </returns>
36 [EditorBrowsable(EditorBrowsableState.Never)]
37 public static string GetFontWidthString(FontWidthType fontWidthType)
39 string value = GetCamelCase(fontWidthType.ToString());
40 return string.IsNullOrEmpty(value) ? "none" : value;
44 /// It returns a string value according to FontWeightType.
45 /// The returned value can be used for FontStyle PropertyMap.
46 /// <param name="fontWeightType">The FontWeightType enum value.</param>
47 /// <returns> A string value for FontStyle.Weight property. </returns>
49 [EditorBrowsable(EditorBrowsableState.Never)]
50 public static string GetFontWeightString(FontWeightType fontWeightType)
52 string value = GetCamelCase(fontWeightType.ToString());
53 return string.IsNullOrEmpty(value) ? "none" : value;
57 /// It returns a string value according to FontSlantType.
58 /// The returned value can be used for FontStyle PropertyMap.
59 /// <param name="fontSlantType">The FontSlantType enum value.</param>
60 /// <returns> A string value for FontStyle.Slant property. </returns>
62 [EditorBrowsable(EditorBrowsableState.Never)]
63 public static string GetFontSlantString(FontSlantType fontSlantType)
65 string value = GetCamelCase(fontSlantType.ToString());
66 return string.IsNullOrEmpty(value) ? "none" : value;
70 /// It returns a string value according to FontSizeType.
71 /// The returned value can be used for TextFit PropertyMap.
72 /// <param name="fontSizeType">The FontSizeType enum value.</param>
73 /// <returns> A string value for TextFit.FontSizeType property. </returns>
75 [EditorBrowsable(EditorBrowsableState.Never)]
76 public static string GetFontSizeString(FontSizeType fontSizeType)
78 string value = GetCamelCase(fontSizeType.ToString());
79 return string.IsNullOrEmpty(value) ? "pointSize" : value;
83 /// It returns a FontWidthType value according to fontWidthString.
84 /// The returned value can be used for FontStyle PropertyMap.
85 /// <param name="fontWidthString">The FontWidth string value.</param>
86 /// <returns> A FontWidthType value for FontStyle.Width property. </returns>
88 [EditorBrowsable(EditorBrowsableState.Never)]
89 public static FontWidthType GetFontWidthType(string fontWidthString)
92 if (!(Enum.TryParse(fontWidthString, true, out value) && Enum.IsDefined(typeof(FontWidthType), value)))
94 value = FontWidthType.None; // If parsing fails, set a default value.
101 /// It returns a FontWeightType value according to fontWeightString.
102 /// The returned value can be used for FontStyle PropertyMap.
103 /// <param name="fontWeightString">The FontWeight string value.</param>
104 /// <returns> A FontWeightType value for FontStyle.Weight property. </returns>
106 [EditorBrowsable(EditorBrowsableState.Never)]
107 public static FontWeightType GetFontWeightType(string fontWeightString)
109 FontWeightType value;
110 if (!(Enum.TryParse(fontWeightString, true, out value) && Enum.IsDefined(typeof(FontWeightType), value)))
112 value = FontWeightType.None; // If parsing fails, set a default value.
119 /// It returns a FontSlantType value according to fontSlantString.
120 /// The returned value can be used for FontStyle PropertyMap.
121 /// <param name="fontSlantString">The FontSlant string value.</param>
122 /// <returns> A FontSlantType value for FontStyle.Slant property. </returns>
124 [EditorBrowsable(EditorBrowsableState.Never)]
125 public static FontSlantType GetFontSlantType(string fontSlantString)
128 if (!(Enum.TryParse(fontSlantString, true, out value) && Enum.IsDefined(typeof(FontSlantType), value)))
130 value = FontSlantType.None; // If parsing fails, set a default value.
137 /// It returns a FontSizeType value according to fontSizeString.
138 /// The returned value can be used for FontStyle PropertyMap.
139 /// <param name="fontSizeString">The FontSizeType string value.</param>
140 /// <returns> A FontSizeType value for TextFit.FontSizeType property. </returns>
142 [EditorBrowsable(EditorBrowsableState.Never)]
143 public static FontSizeType GetFontSizeType(string fontSizeString)
146 if (!(Enum.TryParse(fontSizeString, true, out value) && Enum.IsDefined(typeof(FontSizeType), value)))
148 value = FontSizeType.PointSize; // If parsing fails, set a default value.
155 /// This method converts a FontStyle struct to a PropertyMap and returns it.
156 /// The returned map can be used for set FontStyle PropertyMap in the SetFontStyle method.
157 /// <param name="fontStyle">The FontStyle struct value.</param>
158 /// <returns> A PropertyMap for FontStyle property. </returns>
160 [EditorBrowsable(EditorBrowsableState.Never)]
161 public static PropertyMap GetFontStyleMap(FontStyle fontStyle)
163 var map = new PropertyMap();
164 map.Add("width", GetFontWidthString(fontStyle.Width));
165 map.Add("weight", GetFontWeightString(fontStyle.Weight));
166 map.Add("slant", GetFontSlantString(fontStyle.Slant));
172 /// This method converts a FontStyle map to a struct and returns it.
173 /// The returned struct can be returned to the user as a FontStyle in the GetFontStyle method.
174 /// <param name="map">The FontStyle PropertyMap.</param>
175 /// <returns> A FontStyle struct. </returns>
177 [EditorBrowsable(EditorBrowsableState.Never)]
178 public static FontStyle GetFontStyleStruct(PropertyMap map)
180 var fontStyle = new FontStyle();
183 var defaultValue = "none";
184 fontStyle.Width = GetFontWidthType(GetStringFromMap(map, "width", defaultValue));
185 fontStyle.Weight = GetFontWeightType(GetStringFromMap(map, "weight", defaultValue));
186 fontStyle.Slant = GetFontSlantType(GetStringFromMap(map, "slant", defaultValue));
193 /// This method converts a InputFilter struct to a PropertyMap and returns it. <br />
194 /// The returned map can be used for set InputFilter PropertyMap in the SetInputFilter method. <br />
195 /// <param name="inputFilter">The InputFilter struct value.</param>
196 /// <returns> A PropertyMap for InputFilter property. </returns>
198 [EditorBrowsable(EditorBrowsableState.Never)]
199 public static PropertyMap GetInputFilterMap(InputFilter inputFilter)
201 var defaultValue = "";
203 var map = new PropertyMap();
204 var accepted = inputFilter.Accepted == null ? defaultValue : inputFilter.Accepted;
205 var rejected = inputFilter.Rejected == null ? defaultValue : inputFilter.Rejected;
206 map.Add(0, accepted);
207 map.Add(1, rejected);
213 /// This method converts a InputFilter map to a struct and returns it. <br />
214 /// The returned struct can be returned to the user as a InputFilter in the GetInputFilter method. <br />
215 /// <param name="map">The InputFilter PropertyMap.</param>
216 /// <returns> A InputFilter struct. </returns>
218 [EditorBrowsable(EditorBrowsableState.Never)]
219 public static InputFilter GetInputFilterStruct(PropertyMap map)
221 var inputFilter = new InputFilter();
224 var defaultValue = "";
225 inputFilter.Accepted = GetStringFromMap(map, 0, defaultValue);
226 inputFilter.Rejected = GetStringFromMap(map, 1, defaultValue);
233 /// This method converts a Strikethrough struct to a PropertyMap and returns it.
234 /// The returned map can be used for set Strikethrough PropertyMap in the SetStrikethrough method.
235 /// <param name="strikethrough">The Strikethrough struct value.</param>
236 /// <returns> A PropertyMap for Strikethrough property. </returns>
238 [EditorBrowsable(EditorBrowsableState.Never)]
239 public static PropertyMap GetStrikethroughMap(Strikethrough strikethrough)
241 var map = new PropertyMap();
243 map.Add("enable", strikethrough.Enable);
245 if (strikethrough.Color != null)
246 map.Add("color", strikethrough.Color);
248 if (strikethrough.Height != null)
249 map.Add("height", (float)strikethrough.Height);
255 /// This method converts a Strikethrough map to a struct and returns it.
256 /// The returned struct can be returned to the user as a Strikethrough in the GetUnderline method.
257 /// <param name="map">The Strikethrough PropertyMap.</param>
258 /// <returns> A Strikethrough struct. </returns>
260 [EditorBrowsable(EditorBrowsableState.Never)]
261 public static Strikethrough GetStrikethroughStruct(PropertyMap map)
263 var strikethrough = new Strikethrough();
266 strikethrough.Enable = GetBoolFromMap(map, "enable", false);
267 strikethrough.Color = GetColorFromMap(map, "color");
268 strikethrough.Height = GetFloatFromMap(map, "height", 0.0f);
271 return strikethrough;
276 /// This method converts a Underline struct to a PropertyMap and returns it.
277 /// The returned map can be used for set Underline PropertyMap in the SetUnderline method.
278 /// <param name="underline">The Underline struct value.</param>
279 /// <returns> A PropertyMap for Underline property. </returns>
281 [EditorBrowsable(EditorBrowsableState.Never)]
282 public static PropertyMap GetUnderlineMap(Underline underline)
284 var map = new PropertyMap();
286 map.Add("enable", underline.Enable);
287 map.Add("type", (int)underline.Type);
289 if (underline.Color != null)
290 map.Add("color", underline.Color);
292 if (underline.Height != null)
293 map.Add("height", (float)underline.Height);
295 if (underline.DashWidth != null)
296 map.Add("dashWidth", (float)underline.DashWidth);
298 if (underline.DashGap != null)
299 map.Add("dashGap", (float)underline.DashGap);
305 /// This method converts a Underline map to a struct and returns it.
306 /// The returned struct can be returned to the user as a Underline in the GetUnderline method.
307 /// <param name="map">The Underline PropertyMap.</param>
308 /// <returns> A Underline struct. </returns>
310 [EditorBrowsable(EditorBrowsableState.Never)]
311 public static Underline GetUnderlineStruct(PropertyMap map)
313 var underline = new Underline();
316 underline.Enable = GetBoolFromMap(map, "enable", false);
317 underline.Type = (UnderlineType)GetIntFromMap(map, "type", 0);
318 underline.Color = GetColorFromMap(map, "color");
319 underline.Height = GetFloatFromMap(map, "height", 0.0f);
320 underline.DashWidth = GetNullableFloatFromMap(map, "dashWidth");
321 underline.DashGap = GetNullableFloatFromMap(map, "dashGap");
328 /// This method converts a Shadow struct to a PropertyMap and returns it.
329 /// The returned map can be used for set Shadow PropertyMap in the SetShadow method.
330 /// <param name="shadow">The Shadow struct value.</param>
331 /// <returns> A PropertyMap for Shadow property. </returns>
333 [EditorBrowsable(EditorBrowsableState.Never)]
334 public static PropertyMap GetShadowMap(Tizen.NUI.Text.Shadow shadow)
336 var map = new PropertyMap();
338 if (shadow.Offset != null)
339 map.Add("offset", shadow.Offset);
341 if (shadow.Color != null)
342 map.Add("color", shadow.Color);
344 if (shadow.BlurRadius != null)
345 map.Add("blurRadius", (float)shadow.BlurRadius);
351 /// This method converts a Shadow map to a struct and returns it.
352 /// The returned struct can be returned to the user as a Shadow in the GetShadow method.
353 /// <param name="map">The Shadow PropertyMap.</param>
354 /// <returns> A Shadow struct. </returns>
356 [EditorBrowsable(EditorBrowsableState.Never)]
357 public static Tizen.NUI.Text.Shadow GetShadowStruct(PropertyMap map)
359 var shadow = new Tizen.NUI.Text.Shadow();
362 shadow.Offset = GetVector2FromMap(map, "offset");
363 shadow.Color = GetColorFromMap(map, "color");
364 shadow.BlurRadius = GetFloatFromMap(map, "blurRadius", 0.0f);
371 /// This method converts a Outline struct to a PropertyMap and returns it.
372 /// The returned map can be used for set Outline PropertyMap in the SetOutline method.
373 /// <param name="outline">The Outline struct value.</param>
374 /// <returns> A PropertyMap for Outline property. </returns>
376 [EditorBrowsable(EditorBrowsableState.Never)]
377 public static PropertyMap GetOutlineMap(Outline outline)
379 var map = new PropertyMap();
381 if (outline.Color != null)
382 map.Add("color", outline.Color);
384 if (outline.Width != null)
385 map.Add("width", (float)outline.Width);
391 /// This method converts a Outline map to a struct and returns it.
392 /// The returned struct can be returned to the user as a Outline in the GetOutline method.
393 /// <param name="map">The Outline PropertyMap.</param>
394 /// <returns> A Outline struct. </returns>
396 [EditorBrowsable(EditorBrowsableState.Never)]
397 public static Outline GetOutlineStruct(PropertyMap map)
399 var outline = new Outline();
402 outline.Color = GetColorFromMap(map, "color");
403 outline.Width = GetFloatFromMap(map, "width", 0.0f);
410 /// This method converts a TextFit struct to a PropertyMap and returns it.
411 /// The returned map can be used for set TextFit PropertyMap in the SetTextFit method.
412 /// <param name="textFit">The TextFit struct value.</param>
413 /// <returns> A PropertyMap for TextFit property. </returns>
415 [EditorBrowsable(EditorBrowsableState.Never)]
416 public static PropertyMap GetTextFitMap(TextFit textFit)
418 var map = new PropertyMap();
419 map.Add("enable", textFit.Enable);
420 map.Add("fontSizeType", GetFontSizeString(textFit.FontSizeType));
422 if (textFit.MinSize != null)
423 map.Add("minSize", (float)textFit.MinSize);
425 if (textFit.MaxSize != null)
426 map.Add("maxSize", (float)textFit.MaxSize);
428 if (textFit.StepSize != null)
429 map.Add("stepSize", (float)textFit.StepSize);
435 /// This method converts a TextFit map to a struct and returns it.
436 /// The returned struct can be returned to the user as a TextFit in the GetTextFit method.
437 /// <param name="map">The TextFit PropertyMap.</param>
438 /// <returns> A TextFit struct. </returns>
440 [EditorBrowsable(EditorBrowsableState.Never)]
441 public static TextFit GetTextFitStruct(PropertyMap map)
443 var textFit = new TextFit();
446 var defaultValue = "PointSize";
447 textFit.Enable = GetBoolFromMap(map, "enable", false);
448 textFit.MinSize = GetFloatFromMap(map, "minSize", 0.0f);
449 textFit.MaxSize = GetFloatFromMap(map, "maxSize", 0.0f);
450 textFit.StepSize = GetFloatFromMap(map, "stepSize", 0.0f);
451 textFit.FontSize = GetFloatFromMap(map, "fontSize", 0.0f);
452 textFit.FontSizeType = GetFontSizeType(GetStringFromMap(map, "fontSizeType", defaultValue));
459 /// This method converts a Placeholder struct to a PropertyMap and returns it.
460 /// The returned map can be used for set Placeholder PropertyMap in the SetPlaceholder method.
461 /// <param name="placeholder">The Placeholder struct value.</param>
462 /// <returns> A PropertyMap for Placeholder property. </returns>
464 [EditorBrowsable(EditorBrowsableState.Never)]
465 public static PropertyMap GetPlaceholderMap(Placeholder placeholder)
467 var map = new PropertyMap();
469 if (placeholder.Text != null)
470 map.Add("text", placeholder.Text);
472 if (placeholder.TextFocused != null)
473 map.Add("textFocused", placeholder.TextFocused);
475 if (placeholder.Color != null)
476 map.Add("color", placeholder.Color);
478 if (placeholder.FontFamily != null)
479 map.Add("fontFamily", placeholder.FontFamily);
481 if (placeholder.FontStyle != null)
483 using (var fontStyleMap = GetFontStyleMap((FontStyle)placeholder.FontStyle))
484 using (var fontStyleValue = new PropertyValue(fontStyleMap))
486 map.Add("fontStyle", fontStyleValue);
490 if (placeholder.PointSize != null && placeholder.PixelSize != null)
491 map.Add("pointSize", (float)placeholder.PointSize);
493 else if (placeholder.PointSize != null)
494 map.Add("pointSize", (float)placeholder.PointSize);
496 else if (placeholder.PixelSize != null)
497 map.Add("pixelSize", (float)placeholder.PixelSize);
499 map.Add("ellipsis", placeholder.Ellipsis);
505 /// This method converts a Placeholder map to a struct and returns it.
506 /// The returned struct can be returned to the user as a Placeholder in the GetPlaceholder method.
507 /// <param name="map">The Placeholder PropertyMap.</param>
508 /// <returns> A Placeholder struct. </returns>
510 [EditorBrowsable(EditorBrowsableState.Never)]
511 public static Placeholder GetPlaceholderStruct(PropertyMap map)
513 var placeholder = new Placeholder();
516 var defaultText = "";
517 placeholder.Text = GetStringFromMap(map, 0, defaultText);
518 placeholder.TextFocused = GetStringFromMap(map, 1, defaultText);
519 placeholder.Color = GetColorFromMap(map, 2);
520 placeholder.FontFamily = GetStringFromMap(map, 3, defaultText);
521 using (var fontStyleMap = GetMapFromMap(map, 4))
523 placeholder.FontStyle = GetFontStyleStruct(fontStyleMap);
525 placeholder.PointSize = GetNullableFloatFromMap(map, 5);
526 placeholder.PixelSize = GetNullableFloatFromMap(map, 6);
527 placeholder.Ellipsis = GetBoolFromMap(map, 7, false);
534 /// This method converts a HiddenInput struct to a PropertyMap and returns it.
535 /// The returned map can be used for set HiddenInputSettings PropertyMap in the SetHiddenInput method.
536 /// <param name="hiddenInput">The HiddenInput struct value.</param>
537 /// <returns> A PropertyMap for HiddenInput property. </returns>
539 [EditorBrowsable(EditorBrowsableState.Never)]
540 public static PropertyMap GetHiddenInputMap(HiddenInput hiddenInput)
542 var map = new PropertyMap();
544 map.Add(0, (int)hiddenInput.Mode);
546 if (hiddenInput.SubstituteCharacter != null)
547 map.Add(1, Convert.ToInt32(hiddenInput.SubstituteCharacter));
549 if (hiddenInput.SubstituteCount != null)
550 map.Add(2, (int)hiddenInput.SubstituteCount);
552 if (hiddenInput.ShowLastCharacterDuration != null)
553 map.Add(3, (int)hiddenInput.ShowLastCharacterDuration);
559 /// This method converts a HiddenInputSettings map to a struct and returns it.
560 /// The returned struct can be returned to the user as a HiddenInput in the GetHiddenInput method.
561 /// <param name="map">The HiddenInput PropertyMap.</param>
562 /// <returns> A HiddenInput struct. </returns>
564 [EditorBrowsable(EditorBrowsableState.Never)]
565 public static HiddenInput GetHiddenInputStruct(PropertyMap map)
567 var hiddenInput = new HiddenInput();
570 int defaultVlaue = 0;
571 hiddenInput.Mode = (HiddenInputModeType)GetIntFromMap(map, 0, defaultVlaue);
573 int? substituteCharacter = GetNullableIntFromMap(map, 1);
574 if (substituteCharacter != null)
575 hiddenInput.SubstituteCharacter = Convert.ToChar(substituteCharacter);
577 hiddenInput.SubstituteCount = GetNullableIntFromMap(map, 2);
578 hiddenInput.ShowLastCharacterDuration = GetNullableIntFromMap(map, 3);
585 /// This method converts a fileName string to a PropertyMap and returns it.
586 /// The returned map can be used for set SelectionHandleImageLeft, SelectionHandleImageRight PropertyMap in the SetSelectionHandleImage method.
587 /// <param name="fileName">The file path string value for SelectionHandleImage.</param>
588 /// <returns> A PropertyMap for SelectionHandleImageLeft, SelectionHandleImageRight properties. </returns>
590 [EditorBrowsable(EditorBrowsableState.Never)]
591 public static PropertyMap GetFileNameMap(string fileName)
593 return new PropertyMap().Add("filename", fileName);
597 /// This method converts a SelectionHandleImageLeft, SelectionHandleImageRight map to a struct and returns it.
598 /// The returned struct can be returned to the user as a SelectionHandleImage in the GetSelectionHandleImage method.
599 /// <param name="leftImageMap">The SelectionHandleImageLeft PropertyMap.</param>
600 /// <param name="rightImageMap">The SelectionHandleImageRight PropertyMap.</param>
601 /// <returns> A SelectionHandleImage struct. </returns>
603 [EditorBrowsable(EditorBrowsableState.Never)]
604 public static SelectionHandleImage GetSelectionHandleImageStruct(PropertyMap leftImageMap, PropertyMap rightImageMap)
606 var defaultValue = "";
608 var selectionHandleImage = new SelectionHandleImage();
609 if (null != leftImageMap)
610 selectionHandleImage.LeftImageUrl = GetStringFromMap(leftImageMap, "filename", defaultValue);
612 if (null != rightImageMap)
613 selectionHandleImage.RightImageUrl = GetStringFromMap(rightImageMap, "filename", defaultValue);
615 return selectionHandleImage;
618 internal static string GetCamelCase(string pascalCase)
620 if (!string.IsNullOrEmpty(pascalCase))
622 char[] charArray = pascalCase.ToCharArray();
623 charArray[0] = Char.ToLower(charArray[0]);
624 pascalCase = new string(charArray);
630 internal static string GetStringFromMap(PropertyMap map, string key, string defaultValue)
632 string value = defaultValue;
633 using (var propertyValue = map.Find(0, key))
635 if (null != propertyValue) propertyValue.Get(out value);
640 internal static string GetStringFromMap(PropertyMap map, int key, string defaultValue)
642 string value = defaultValue;
643 using (var propertyValue = map.Find(key))
645 if (null != propertyValue) propertyValue.Get(out value);
650 internal static bool GetBoolFromMap(PropertyMap map, string key, bool defaultValue)
652 bool value = defaultValue;
653 using (var propertyValue = map.Find(0, key))
655 if (null != propertyValue) propertyValue.Get(out value);
660 internal static bool GetBoolFromMap(PropertyMap map, int key, bool defaultValue)
662 bool value = defaultValue;
663 using (var propertyValue = map.Find(key))
665 if (null != propertyValue) propertyValue.Get(out value);
670 internal static int GetIntFromMap(PropertyMap map, int key, int defaultValue)
672 int value = defaultValue;
673 using (var propertyValue = map.Find(key))
675 if (null != propertyValue) propertyValue.Get(out value);
680 internal static int GetIntFromMap(PropertyMap map, string key, int defaultValue)
682 int value = defaultValue;
683 using (var propertyValue = map.Find(0, key))
685 if (null != propertyValue) propertyValue.Get(out value);
690 internal static float GetFloatFromMap(PropertyMap map, string key, float defaultValue)
692 float value = defaultValue;
693 using (var propertyValue = map.Find(0, key))
695 if (null != propertyValue) propertyValue.Get(out value);
700 internal static Color GetColorFromMap(PropertyMap map, string key)
702 Color value = new Color();
703 using (var propertyValue = map.Find(0, key))
705 if (null != propertyValue) propertyValue.Get(value);
710 internal static Color GetColorFromMap(PropertyMap map, int key)
712 Color value = new Color();
713 using (var propertyValue = map.Find(key))
715 if (null != propertyValue) propertyValue.Get(value);
720 internal static Vector2 GetVector2FromMap(PropertyMap map, string key)
722 Vector2 value = new Vector2();
723 using (var propertyValue = map.Find(0, key))
725 if (null != propertyValue) propertyValue.Get(value);
730 internal static PropertyMap GetMapFromMap(PropertyMap map, int key)
732 PropertyMap value = new PropertyMap();
733 using (var propertyValue = map.Find(key))
735 if (null != propertyValue) propertyValue.Get(value);
740 internal static PropertyArray GetArrayFromMap(PropertyMap map, string key)
742 PropertyArray value = new PropertyArray();
743 using (var propertyValue = map.Find(0, key))
745 if (null != propertyValue) propertyValue.Get(value);
750 internal static int? GetNullableIntFromMap(PropertyMap map, int key)
752 using (var propertyValue = map.Find(key))
754 if (propertyValue == null)
757 propertyValue.Get(out int value);
762 internal static float? GetNullableFloatFromMap(PropertyMap map, int key)
764 using (var propertyValue = map.Find(key))
766 if (propertyValue == null)
769 propertyValue.Get(out float value);
774 internal static float? GetNullableFloatFromMap(PropertyMap map, string key)
776 using (var propertyValue = map.Find(0, key))
778 if (propertyValue == null)
781 propertyValue.Get(out float value);
786 internal static bool IsValue(PropertyMap map, int key)
788 using (var propertyValue = map.Find(key))
790 if (propertyValue == null)