[NUI] remove SelectGroup.ItemGroup setter (#1709)
authorYeongJong Lee <cleanlyj@naver.com>
Mon, 22 Jun 2020 05:32:29 +0000 (14:32 +0900)
committerGitHub <noreply@github.com>
Mon, 22 Jun 2020 05:32:29 +0000 (14:32 +0900)
Since `SelectGroup.ItemGroup` is initialized in `SelectGroup` constructor, it
should not be assigned by api user.

Also, this fixes `CA2227: Collection properties should be read only`.
https://docs.microsoft.com/en-us/visualstudio/code-quality/ca2227?view=vs-2019

src/Tizen.NUI.Components/Controls/SelectGroup.cs

index 09ea95d..9f0e270 100755 (executable)
@@ -32,13 +32,11 @@ namespace Tizen.NUI.Components
     [EditorBrowsable(EditorBrowsableState.Never)]
     public abstract class SelectGroup
     {
-        private List<SelectButton> itemGroup;
-
         /// <summary> Selection group composed of items </summary>
         /// <since_tizen> 6 </since_tizen>
         /// This will be public opened in tizen_5.5 after ACR done. Before ACR, need to be hidden as inhouse API.
         [EditorBrowsable(EditorBrowsableState.Never)]
-        protected List<SelectButton> ItemGroup { get => itemGroup; set => itemGroup = value; }
+        protected List<SelectButton> ItemGroup { get; }
 
         private int selectedIndex;