@@ -31,35 +31,19 @@ internal class ParameterDefinitionEntry
3131 /// <param name="mandatory"></param>
3232 internal ParameterDefinitionEntry ( string parameterSetName , bool mandatory )
3333 {
34- this . mandatory = mandatory ;
35- this . parameterSetName = parameterSetName ;
34+ this . IsMandatory = mandatory ;
35+ this . ParameterSetName = parameterSetName ;
3636 }
3737
3838 /// <summary>
3939 /// Property ParameterSetName.
4040 /// </summary>
41- internal string ParameterSetName
42- {
43- get
44- {
45- return this . parameterSetName ;
46- }
47- }
48-
49- private readonly string parameterSetName = null ;
41+ internal string ParameterSetName { get ; } = null ;
5042
5143 /// <summary>
5244 /// Whether the parameter is mandatory to the set.
5345 /// </summary>
54- internal bool IsMandatory
55- {
56- get
57- {
58- return this . mandatory ;
59- }
60- }
61-
62- private readonly bool mandatory = false ;
46+ internal bool IsMandatory { get ; } = false ;
6347 }
6448
6549 /// <summary>
@@ -75,8 +59,8 @@ internal class ParameterSetEntry
7559 /// <param name="mandatoryParameterCount"></param>
7660 internal ParameterSetEntry ( UInt32 mandatoryParameterCount )
7761 {
78- this . mandatoryParameterCount = mandatoryParameterCount ;
79- this . isDefaultParameterSet = false ;
62+ this . MandatoryParameterCount = mandatoryParameterCount ;
63+ this . IsDefaultParameterSet = false ;
8064 reset ( ) ;
8165 }
8266
@@ -86,8 +70,8 @@ internal ParameterSetEntry(UInt32 mandatoryParameterCount)
8670 /// <param name="toClone"></param>
8771 internal ParameterSetEntry ( ParameterSetEntry toClone )
8872 {
89- this . mandatoryParameterCount = toClone . MandatoryParameterCount ;
90- this . isDefaultParameterSet = toClone . IsDefaultParameterSet ;
73+ this . MandatoryParameterCount = toClone . MandatoryParameterCount ;
74+ this . IsDefaultParameterSet = toClone . IsDefaultParameterSet ;
9175 reset ( ) ;
9276 }
9377
@@ -98,8 +82,8 @@ internal ParameterSetEntry(ParameterSetEntry toClone)
9882 /// <param name="mandatory"></param>
9983 internal ParameterSetEntry ( UInt32 mandatoryParameterCount , bool isDefault )
10084 {
101- this . mandatoryParameterCount = mandatoryParameterCount ;
102- this . isDefaultParameterSet = isDefault ;
85+ this . MandatoryParameterCount = mandatoryParameterCount ;
86+ this . IsDefaultParameterSet = isDefault ;
10387 reset ( ) ;
10488 }
10589
@@ -108,107 +92,39 @@ internal ParameterSetEntry(UInt32 mandatoryParameterCount, bool isDefault)
10892 /// </summary>
10993 internal void reset ( )
11094 {
111- this . setMandatoryParameterCount = this . setMandatoryParameterCountAtBeginProcess ;
112- this . isValueSet = this . isValueSetAtBeginProcess ;
95+ this . SetMandatoryParameterCount = this . SetMandatoryParameterCountAtBeginProcess ;
96+ this . IsValueSet = this . IsValueSetAtBeginProcess ;
11397 }
11498
11599 /// <summary>
116100 /// Property <c>DefaultParameterSet</c>
117101 /// </summary>
118- internal bool IsDefaultParameterSet
119- {
120- get
121- {
122- return this . isDefaultParameterSet ;
123- }
124- }
125-
126- private readonly bool isDefaultParameterSet = false ;
102+ internal bool IsDefaultParameterSet { get ; } = false ;
127103
128104 /// <summary>
129105 /// Property <c>MandatoryParameterCount</c>
130106 /// </summary>
131- internal UInt32 MandatoryParameterCount
132- {
133- get
134- {
135- return this . mandatoryParameterCount ;
136- }
137- }
138-
139- private readonly UInt32 mandatoryParameterCount = 0 ;
107+ internal UInt32 MandatoryParameterCount { get ; } = 0 ;
140108
141109 /// <summary>
142110 /// Property <c>IsValueSet</c>
143111 /// </summary>
144- internal bool IsValueSet
145- {
146- get
147- {
148- return this . isValueSet ;
149- }
150-
151- set
152- {
153- this . isValueSet = value ;
154- }
155- }
156-
157- private bool isValueSet = false ;
112+ internal bool IsValueSet { get ; set ; } = false ;
158113
159114 /// <summary>
160115 /// Property <c>IsValueSetAtBeginProcess</c>
161116 /// </summary>
162- internal bool IsValueSetAtBeginProcess
163- {
164- get
165- {
166- return this . isValueSetAtBeginProcess ;
167- }
168-
169- set
170- {
171- this . isValueSetAtBeginProcess = value ;
172- }
173- }
174-
175- private bool isValueSetAtBeginProcess = false ;
117+ internal bool IsValueSetAtBeginProcess { get ; set ; } = false ;
176118
177119 /// <summary>
178120 /// Property <c>SetMandatoryParameterCount</c>
179121 /// </summary>
180- internal UInt32 SetMandatoryParameterCount
181- {
182- get
183- {
184- return this . setMandatoryParameterCount ;
185- }
186-
187- set
188- {
189- this . setMandatoryParameterCount = value ;
190- }
191- }
192-
193- private UInt32 setMandatoryParameterCount = 0 ;
122+ internal UInt32 SetMandatoryParameterCount { get ; set ; } = 0 ;
194123
195124 /// <summary>
196125 /// Property <c>SetMandatoryParameterCountAtBeginProcess</c>
197126 /// </summary>
198- internal UInt32 SetMandatoryParameterCountAtBeginProcess
199- {
200- get
201- {
202- return this . setMandatoryParameterCountAtBeginProcess ;
203- }
204-
205- set
206- {
207- this . setMandatoryParameterCountAtBeginProcess = value ;
208- }
209- }
210-
211- private UInt32 setMandatoryParameterCountAtBeginProcess = 0 ;
127+ internal UInt32 SetMandatoryParameterCountAtBeginProcess { get ; set ; } = 0 ;
212128 }
213129
214130 /// <summary>
@@ -531,15 +447,15 @@ internal void CheckParameterSet()
531447 {
532448 try
533449 {
534- this . parameterSetName = this . parameterBinder . GetParameterSet ( ) ;
450+ this . ParameterSetName = this . parameterBinder . GetParameterSet ( ) ;
535451 }
536452 finally
537453 {
538454 this . parameterBinder . reset ( ) ;
539455 }
540456 }
541457
542- DebugHelper . WriteLog ( "current parameterset is: " + this . parameterSetName , 4 ) ;
458+ DebugHelper . WriteLog ( "current parameterset is: " + this . ParameterSetName , 4 ) ;
543459 }
544460
545461 /// <summary>
@@ -689,13 +605,6 @@ protected virtual void DisposeInternal()
689605 /// </summary>
690606 private readonly object myLock = new ( ) ;
691607
692- /// <summary>
693- /// <para>
694- /// parameter set name
695- /// </para>
696- /// </summary>
697- private string parameterSetName ;
698-
699608 /// <summary>
700609 /// This flag is introduced to resolve the parameter set name
701610 /// during process record
@@ -747,13 +656,7 @@ internal CimAsyncOperation AsyncOperation
747656 /// Get current ParameterSetName of the cmdlet
748657 /// </para>
749658 /// </summary>
750- internal string ParameterSetName
751- {
752- get
753- {
754- return this . parameterSetName ;
755- }
756- }
659+ internal string ParameterSetName { get ; private set ; }
757660
758661 /// <summary>
759662 /// Gets/Sets cmdlet operation wrapper object.
0 commit comments