@@ -99,11 +99,14 @@ public Problem With<TEnum>(string key, TEnum value)
9999 }
100100
101101 /// <summary>
102- /// Encadeia uma propriedade ao início da propriedade atual, formando uma propriedade aninhada (ex: Endereco.Rua ).
102+ /// Chains a property to the beginning of the current property, forming a nested property (e.g. Parent.Current ).
103103 /// </summary>
104- /// <param name="parentProperty">Nome da propriedade a ser encadeada.</param>
105- /// <returns>Esta instância de Problem com a propriedade modificada.</returns>
106- public Problem ChainProperty ( string parentProperty )
104+ /// <remarks>
105+ /// When <see cref="Property"/> or <paramref name="parentProperty"/> is null or empty, this method does nothing.
106+ /// </remarks>
107+ /// <param name="parentProperty">Name of the property to be chained.</param>
108+ /// <returns>The same instance of the problem.</returns>
109+ public Problem ChainProperty ( string ? parentProperty )
107110 {
108111 if ( string . IsNullOrEmpty ( parentProperty ) || string . IsNullOrEmpty ( _property ) )
109112 return this ;
@@ -113,12 +116,15 @@ public Problem ChainProperty(string parentProperty)
113116 }
114117
115118 /// <summary>
116- /// Encadeia uma propriedade de coleção com índice ao início da propriedade atual (ex: Endereco [0].Rua ).
119+ /// Chains a collection property with index to the beginning of the current property (e.g. Parent [0].Current ).
117120 /// </summary>
118- /// <param name="parentProperty">Nome da propriedade de coleção.</param>
119- /// <param name="index">Índice da coleção.</param>
120- /// <returns>Esta instância de Problem com a propriedade modificada.</returns>
121- public Problem ChainProperty ( string parentProperty , int index )
121+ /// <remarks>
122+ /// When <see cref="Property"/> or <paramref name="parentProperty"/> is null or empty, this method does nothing.
123+ /// </remarks>
124+ /// <param name="parentProperty">Name of the property to be chained.</param>
125+ /// <param name="index">Collection index.</param>
126+ /// <returns>The same instance of the problem.</returns>
127+ public Problem ChainProperty ( string ? parentProperty , int index )
122128 {
123129 if ( string . IsNullOrEmpty ( parentProperty ) || string . IsNullOrEmpty ( _property ) )
124130 return this ;
0 commit comments