Skip to content

Commit 454b937

Browse files
committed
Fixed certain issues, appeared during changes in branch
1 parent e804014 commit 454b937

File tree

9 files changed

+8
-10
lines changed

9 files changed

+8
-10
lines changed

Orm/Xtensive.Orm/Modelling/Comparison/Upgrader.cs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -119,8 +119,6 @@ public IReadOnlyList<NodeAction> GetUpgradeSequence(Difference difference, HintS
119119
/// <exception cref="InvalidOperationException">Upgrade sequence validation has failed.</exception>
120120
public IReadOnlyList<NodeAction> GetUpgradeSequence(Difference difference, HintSet hints, IComparer comparer)
121121
{
122-
ArgumentNullException.ThrowIfNull(hints, nameof(hints));
123-
ArgumentNullException.ThrowIfNull(comparer, nameof(comparer));
124122
if (difference == null) {
125123
return Array.Empty<NodeAction>();
126124
}
@@ -129,7 +127,7 @@ public IReadOnlyList<NodeAction> GetUpgradeSequence(Difference difference, HintS
129127
SourceModel = (IModel) difference.Source;
130128
TargetModel = (IModel) difference.Target;
131129
Hints = hints ?? new HintSet(SourceModel, TargetModel);
132-
Comparer = comparer;
130+
Comparer = comparer ?? throw new ArgumentNullException(nameof(comparer));
133131
if (Hints.SourceModel != SourceModel) {
134132
throw new ArgumentOutOfRangeException("hints.SourceModel");
135133
}

Orm/Xtensive.Orm/Orm/Internals/Prefetch/EntityContainer.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@
66

77
using System;
88
using System.Collections.Generic;
9-
using System.Diagnostics.CodeAnalysis;
109
using Xtensive.Core;
1110
using Xtensive.Orm.Model;
1211
using Xtensive.Tuples;
@@ -17,8 +16,6 @@ namespace Xtensive.Orm.Internals.Prefetch
1716
[Serializable]
1817
internal abstract class EntityContainer
1918
{
20-
private static readonly Parameter<Tuple> seekParameter = new Parameter<Tuple>(WellKnown.KeyFieldName);
21-
2219
private SortedDictionary<int, ColumnInfo> columns;
2320

2421
protected readonly PrefetchManager Manager;

Orm/Xtensive.Orm/Orm/Linq/Translator.Expressions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,7 @@ protected override Expression VisitMethodCall(MethodCallExpression mc)
506506
if (methodDeclaringType == typeof(QueryableExtensions)) {
507507
return methodName switch {
508508
Reflection.WellKnown.QueryableExtensions.LeftJoin => VisitLeftJoin(mc),
509+
Reflection.WellKnown.QueryableExtensions.LeftJoinEx => VisitLeftJoin(mc),
509510
Reflection.WellKnown.QueryableExtensions.In => VisitIn(mc),
510511
Reflection.WellKnown.QueryableExtensions.Lock => VisitLock(mc),
511512
Reflection.WellKnown.QueryableExtensions.Take => VisitTake(mc.Arguments[0], mc.Arguments[1]),

Orm/Xtensive.Orm/Orm/Linq/WellknownMembers.Queryable.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ public static class Queryable
8080
// Queryable extensions
8181
public static readonly MethodInfo ExtensionCount = GetQueryableExtensionsMethod(nameof(QueryableExtensions.Count), 0, 1);
8282
public static readonly MethodInfo ExtensionLeftJoin = GetQueryableExtensionsMethod(nameof(QueryableExtensions.LeftJoin), 4, 5);
83+
public static readonly MethodInfo ExtensionLeftJoinEx = GetQueryableExtensionsMethod(nameof(QueryableExtensions.LeftJoinEx), 4, 5);
8384
public static readonly MethodInfo ExtensionLock = GetQueryableExtensionsMethod(nameof(QueryableExtensions.Lock), 1, 3);
8485
public static readonly MethodInfo ExtensionTake = GetQueryableExtensionsMethod(nameof(QueryableExtensions.Take), 1, 2);
8586
public static readonly MethodInfo ExtensionSkip = GetQueryableExtensionsMethod(nameof(QueryableExtensions.Skip), 1, 2);

Orm/Xtensive.Orm/Orm/Rse/Providers/Compilable/FreeTextProvider.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public FreeTextProvider(
4949
{
5050
SearchCriteria = searchCriteria ?? throw new ArgumentNullException(nameof(searchCriteria));
5151
FullFeatured = fullFeatured;
52-
TopN = topN ?? throw new ArgumentNullException(nameof(topN));
52+
TopN = topN;
5353
PrimaryIndex = new IndexInfoRef(index.PrimaryIndex);
5454
if (FullFeatured) {
5555
var primaryIndexRecordsetHeader = index.PrimaryIndex.ReflectedType.Indexes.PrimaryIndex.GetRecordSetHeader();

Orm/Xtensive.Orm/Orm/Upgrade/Model/PrimaryIndexInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ protected override void ValidateState()
5656
throw new ValidationException(Strings.ExPrimaryKeyColumnCanNotBeNullable, Path);
5757
});
5858

59-
var values = ValueColumns.Select(valueRef => valueRef.Value).ToArray(KeyColumns.Count);
59+
var values = ValueColumns.Select(valueRef => valueRef.Value).ToArray(ValueColumns.Count);
6060
var allCount = keys.Length + values.Length;
6161
if (allCount!=tableColumns.Count)
6262
ea.Execute(() => {

Orm/Xtensive.Orm/Orm/VersionCapturer.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,7 @@ public static VersionCapturer Attach(Session session, VersionSet versions)
130130
private VersionCapturer(Session session, VersionSet versions)
131131
: base(session)
132132
{
133-
ArgumentNullException.ThrowIfNull(versions);
134-
Versions = versions;
133+
Versions = versions ?? throw new ArgumentNullException(nameof(versions));
135134
AttachEventHandlers();
136135
}
137136

Orm/Xtensive.Orm/Reflection/WellKnown.QueryableExtensions.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ public static class QueryableExtensions
1313
{
1414
public const string Count = nameof(Orm.QueryableExtensions.Count);
1515
public const string LeftJoin = nameof(Orm.QueryableExtensions.LeftJoin);
16+
public const string LeftJoinEx = nameof(Orm.QueryableExtensions.LeftJoinEx);
1617
public const string Lock = nameof(Orm.QueryableExtensions.Lock);
1718
public const string Take = nameof(Orm.QueryableExtensions.Take);
1819
public const string Skip = nameof(Orm.QueryableExtensions.Skip);

Orm/Xtensive.Orm/Tuples/Transform/MapTransform.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,7 @@ public MapTransform(bool isReadOnly, TupleDescriptor descriptor, IReadOnlyList<i
294294
protected MapTransform(bool isReadOnly, TupleDescriptor descriptor)
295295
: this(isReadOnly)
296296
{
297+
ArgumentValidator.EnsureArgumentIsNotDefault(descriptor, nameof(descriptor));
297298
Descriptor = descriptor;
298299
this.isReadOnly = isReadOnly;
299300
}

0 commit comments

Comments
 (0)