Ejemplo n.º 1
0
            // 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);
            }
Ejemplo n.º 2
0
 public ReadonlyMemberDiffersError(SourceAndTargetValue sourceAndTargetValue, MemberInfo member)
 {
     this.SourceAndTargetValue = sourceAndTargetValue;
     this.Member = member;
 }