internal void Validate(int index, SyncColumnMapping item) { if (item == null) { throw SyncExpt.ArgumentNull("item"); } if (item.Parent != null && this != item.Parent) { throw SyncExpt.Argument("", "item.Parent"); } string serverColumn1 = item.ServerColumn; if (SyncUtil.IsEmpty(serverColumn1)) { index = 1; string serverColumn2; do { serverColumn2 = "ServerColumn" + index.ToString((IFormatProvider)CultureInfo.InvariantCulture); ++index; }while (-1 != this.IndexOfServerColumn(serverColumn2)); item.ServerColumn = serverColumn2; } else { this.ValidateServerColumn(index, serverColumn1); } string clientColumn = item.ClientColumn; this.ValidateClientColumn(index, clientColumn); }
internal static void CheckArgumentNull(object value, string parameterName) { if (value == null) { throw SyncExpt.ArgumentNull(parameterName); } }