public static IDialogParameters AddOnInit <TParameter>(this IDialogParameters @this, params KeyValuePair <string, TParameter>[] parameters) { @this.VerifyReference(); parameters.VerifyCollectionNotNullOrEmpty(); foreach (var parameter in parameters) { var key = parameter.Key; var value = parameter.Value; @this.Add(key, value); } return(@this); }