Beispiel #1
0
        /// <summary>
        /// Instantiates an object with the provided <see cref="ComparingSettings"/>.
        /// </summary>
        /// <param name="settings">The settings used to diff the elements in the mapper.</param>
        /// <param name="rightSetSize">The number of elements in the right set to compare.</param>
        public ElementMapper(ComparingSettings settings, int rightSetSize)
        {
            if (rightSetSize <= 0)
            {
                throw new ArgumentOutOfRangeException(nameof(rightSetSize), Resources.ShouldBeGreaterThanZero);
            }

            Settings = settings;
            Right    = new T[rightSetSize];
        }
Beispiel #2
0
        /// <summary>
        /// Instantiates an object with the provided <see cref="ComparingSettings"/>.
        /// </summary>
        /// <param name="settings">The settings used to diff the elements in the mapper.</param>
        /// <param name="rightSetSize">The number of elements in the right set to compare.</param>
        public ElementMapper(ComparingSettings settings, int rightSetSize)
        {
            if (rightSetSize <= 0)
            {
                throw new ArgumentOutOfRangeException(nameof(rightSetSize), Resources.ShouldBeGreaterThanZero);
            }

            Settings            = settings ?? throw new ArgumentNullException(nameof(settings));
            Right               = new T[rightSetSize];
            _assemblyLoadErrors = new IList <CompatDifference> [rightSetSize];
            for (int i = 0; i < rightSetSize; i++)
            {
                _assemblyLoadErrors[i] = new List <CompatDifference>();
            }
        }
Beispiel #3
0
 /// <summary>
 /// Instantiates an object with the provided <see cref="ComparingSettings"/>.
 /// </summary>
 /// <param name="settings">The settings used to diff the elements in the mapper.</param>
 /// <param name="rightSetSize">The number of elements in the right set to compare.</param>
 public MemberMapper(ComparingSettings settings, TypeMapper containingType, int rightSetSize = 1)
     : base(settings, rightSetSize)
 {
     _containingType = containingType;
 }
Beispiel #4
0
 /// <summary>
 /// Instantiates an object with the provided <see cref="ComparingSettings"/>.
 /// </summary>
 /// <param name="settings">The settings used to diff the elements in the mapper.</param>
 /// <param name="rightSetSize">The number of elements in the right set to compare.</param>
 /// <param name="typeforwardsOnly">Indicates if <see cref="GetTypes"/> should only return typeforwards.</param>
 public NamespaceMapper(ComparingSettings settings, int rightSetSize = 1, bool typeforwardsOnly = false)
     : base(settings, rightSetSize)
 {
     _typeforwardsOnly = typeforwardsOnly;
 }
Beispiel #5
0
 /// <summary>
 /// Instantiates an object with the provided <see cref="ComparingSettings"/>.
 /// </summary>
 /// <param name="settings">The settings used to diff the elements in the mapper.</param>
 /// <param name="rightSetSize">The number of elements in the right set to compare.</param>
 public NamespaceMapper(ComparingSettings settings, int rightSetSize = 1)
     : base(settings, rightSetSize)
 {
 }
Beispiel #6
0
 /// <summary>
 /// Instantiates an object with the provided <see cref="ComparingSettings"/>.
 /// </summary>
 /// <param name="settings">The settings used to diff the elements in the mapper.</param>
 /// <param name="rightSetSize">The number of elements in the right set to compare.</param>
 public AssemblyMapper(ComparingSettings settings, int rightSetSize = 1)
     : base(settings, rightSetSize)
 {
 }