// ReSharper disable once UnusedParameter.Local internal static void ReadonlyMemberDiffers( SourceAndTargetValue sourceAndTargetValue, MemberInfo member, MemberSettings settings) { var error = new ReadonlyMemberDiffersError(sourceAndTargetValue, member); var typeErrors = new TypeErrors(sourceAndTargetValue.Source?.GetType(), error); var message = typeErrors.GetErrorText(settings, typeof(Copy).Name, settings.CopyMethodName()); throw new InvalidOperationException(message); }
public ReadonlyMemberDiffersError(SourceAndTargetValue sourceAndTargetValue, MemberInfo member) { this.SourceAndTargetValue = sourceAndTargetValue; this.Member = member; }