Skip to content

Commit c959643

Browse files
committed
Merge branch '6.0' into 6.0-fix-nuget-readme
2 parents 9ee1867 + 842a293 commit c959643

File tree

63 files changed

+6890
-595
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+6890
-595
lines changed

ChangeLog/6.0.13_dev.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
[main] Fixed certain cases of bad translation of casts via 'as' operator in LINQ queries
2+
[main] Addressed certain issues of translation connected with comparison with local entity instace within LINQ queries
3+
[main] Fixed rare issues of incorrect translation of filtered index expressions including conditional expressions
4+
[main] Join/LeftJoin is denied to have the same expression instance for both inner/outer selector
5+
[main] Addressed issue when wrong type of join was chosen when .First/FirstOrDefalult() method was used as subquery
6+
[main] Added dedicated exception when RenameFieldHint.TargetType exists in current model but absent in storage model
7+
[postgresql] Fixed issue of incorrect translation of contitional expressions including comparison with nullable fields

Directory.Build.props

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@
4040
<ProjectAssetsFile>$(MSBuildProjectExtensionsPath)project.assets.json</ProjectAssetsFile>
4141
<ProjectAssetsCacheFile>$(MSBuildProjectExtensionsPath)$(MSBuildProjectName).assets.cache</ProjectAssetsCacheFile>
4242
<OrmKeyFile>$(SolutionDir)Orm\Orm.snk</OrmKeyFile>
43+
<NoWarn>$(NoWarn);NETSDK1138</NoWarn>
4344
</PropertyGroup>
4445

4546
<PropertyGroup>

Extensions/Xtensive.Orm.Logging.NLog/Log.cs

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// Copyright (C) 2003-2013 Xtensive LLC.
2-
// All rights reserved.
3-
// For conditions of distribution and use, see license.
1+
// Copyright (C) 2013-2023 Xtensive LLC.
2+
// This code is distributed under MIT license terms.
3+
// See the License.txt file in the project root for more information.
44
// Created by: Dmitri Maximov
55
// Created: 2013.12.13
66

@@ -10,6 +10,9 @@
1010

1111
namespace Xtensive.Orm.Logging.NLog
1212
{
13+
/// <summary>
14+
/// Log implementation for NLog.
15+
/// </summary>
1316
public class Log : BaseLog
1417
{
1518
private readonly Logger target;
@@ -30,11 +33,13 @@ private static NLogLevel ConvertLevel(LogLevel level)
3033
}
3134
}
3235

36+
/// <inheritdoc/>
3337
public override bool IsLogged(LogLevel level)
3438
{
3539
return target.IsEnabled(ConvertLevel(level));
3640
}
3741

42+
/// <inheritdoc/>
3843
public override void Write(LogEventInfo info)
3944
{
4045
if (info.Exception!=null)
@@ -43,6 +48,10 @@ public override void Write(LogEventInfo info)
4348
target.Log(ConvertLevel(info.Level), info.FormattedMessage);
4449
}
4550

51+
/// <summary>
52+
/// Creates instance of <see cref="Log"/> class.
53+
/// </summary>
54+
/// <param name="name">Log name.</param>
4655
public Log(string name)
4756
{
4857
target = NLogManager.GetLogger(name);

Extensions/Xtensive.Orm.Logging.NLog/LogProvider.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,17 @@
1-
// Copyright (C) 2003-2013 Xtensive LLC.
2-
// All rights reserved.
3-
// For conditions of distribution and use, see license.
1+
// Copyright (C) 2013-2023 Xtensive LLC.
2+
// This code is distributed under MIT license terms.
3+
// See the License.txt file in the project root for more information.
44
// Created by: Dmitri Maximov
55
// Created: 2013.12.13
66

77
namespace Xtensive.Orm.Logging.NLog
88
{
9+
/// <summary>
10+
/// Provides NLog specific <see cref="BaseLog"/> descendant instances.
11+
/// </summary>
912
public class LogProvider : Logging.LogProvider
1013
{
14+
/// <inheritdoc />
1115
public override BaseLog GetLog(string logName)
1216
{
1317
return new Log(logName);

Extensions/Xtensive.Orm.Logging.log4net/Log.cs

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// Copyright (C) 2014 Xtensive LLC.
2-
// All rights reserved.
3-
// For conditions of distribution and use, see license.
1+
// Copyright (C) 2014-2023 Xtensive LLC.
2+
// This code is distributed under MIT license terms.
3+
// See the License.txt file in the project root for more information.
44
// Created by: Alexey Kulakov
55
// Created: 2014.02.20
66

@@ -11,6 +11,9 @@
1111

1212
namespace Xtensive.Orm.Logging.log4net
1313
{
14+
/// <summary>
15+
/// Log implementation for log4net.
16+
/// </summary>
1417
public class Log : BaseLog
1518
{
1619
private log4netLog target;
@@ -32,16 +35,25 @@ private Level ConvertLevel(LogLevel level)
3235
return Level.Info;
3336
}
3437
}
38+
39+
/// <inheritdoc />
3540
public override bool IsLogged(LogLevel level)
3641
{
3742
return target.Logger.IsEnabledFor(ConvertLevel(level));
3843
}
3944

45+
/// <inheritdoc />
4046
public override void Write(LogEventInfo info)
4147
{
4248
target.Logger.Log(target.Logger.GetType(), ConvertLevel(info.Level), info.FormattedMessage, info.Exception);
4349
}
4450

51+
/// <summary>
52+
/// Creates instance of <see cref="Log"/> class.
53+
/// </summary>
54+
/// <param name="repositoryAssembly">An <see cref="Assembly"/> instance this <see cref="Log"/> instance
55+
/// is related to.</param>
56+
/// <param name="name">Log name.</param>
4557
public Log(Assembly repositoryAssembly, string name)
4658
{
4759
target = log4netLogManager.GetLogger(repositoryAssembly, name);

Extensions/Xtensive.Orm.Logging.log4net/LogProvider.cs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// Copyright (C) 2014 Xtensive LLC.
2-
// All rights reserved.
3-
// For conditions of distribution and use, see license.
1+
// Copyright (C) 2014-2023 Xtensive LLC.
2+
// This code is distributed under MIT license terms.
3+
// See the License.txt file in the project root for more information.
44
// Created by: Alexey Kulakov
55
// Created: 2014.02.20
66

@@ -9,8 +9,12 @@
99

1010
namespace Xtensive.Orm.Logging.log4net
1111
{
12+
/// <summary>
13+
/// Provides log4net specific <see cref="BaseLog"/> descendant instances.
14+
/// </summary>
1215
public class LogProvider : Logging.LogProvider
1316
{
17+
/// <inheritdoc />
1418
public override BaseLog GetLog(string logName)
1519
{
1620
return new Log(Assembly.GetCallingAssembly(), logName);
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,37 @@
1+
// Copyright (C) 2019-2023 Xtensive LLC.
2+
// This code is distributed under MIT license terms.
3+
// See the License.txt file in the project root for more information.
4+
15
using System.Collections.Generic;
26
using Xtensive.Tuples;
37

48
namespace Xtensive.Orm.Tracking
59
{
10+
/// <summary>
11+
/// Represents changes happened to an <see cref="Entity"/>.
12+
/// </summary>
613
public interface ITrackingItem
714
{
15+
/// <summary>
16+
/// Gets <see cref="Entity"/> key.
17+
/// </summary>
818
Key Key { get; }
919

20+
/// <summary>
21+
/// Gets raw <see cref="Entity"/> data as <see cref="DifferentialTuple"/>.
22+
/// </summary>
1023
DifferentialTuple RawData { get; }
1124

25+
/// <summary>
26+
/// Gets a state of a tracked <see cref="Entity"/>.
27+
/// It might be <see cref="TrackingItemState.Created"/> or <see cref="TrackingItemState.Changed"/>
28+
/// or <see cref="TrackingItemState.Deleted"/>.
29+
/// </summary>
1230
TrackingItemState State { get; }
1331

32+
/// <summary>
33+
/// Gets list of detected changes of field values.
34+
/// </summary>
1435
IList<ChangedValue> ChangedValues { get; }
1536
}
1637
}

Extensions/Xtensive.Orm.Tracking/Internals/SessionTrackingMonitor.cs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1-
using System;
1+
// Copyright (C) 2019-2023 Xtensive LLC.
2+
// This code is distributed under MIT license terms.
3+
// See the License.txt file in the project root for more information.
4+
5+
using System;
26
using System.Collections.Generic;
37
using System.Linq;
48
using Xtensive.IoC;
@@ -65,17 +69,15 @@ private void OnPersisting(object sender, EventArgs e)
6569
/// </summary>
6670
/// <param name="session"><see cref="T:Xtensive.Orm.Session"/>, to which current instance
6771
/// is bound.</param>
72+
/// <param name="accessor"><see cref="DirectSessionAccessor"/> instance to get access to
73+
/// changed entities of each kind. See <see cref="DirectSessionAccessor.GetChangedEntities"/> method
74+
/// for reference.</param>
6875
/// <exception cref="T:System.ArgumentNullException"><paramref name="session"/> is <see langword="null"/>.</exception>
6976
[ServiceConstructor]
7077
public SessionTrackingMonitor(Session session, DirectSessionAccessor accessor)
7178
{
72-
if (session==null)
73-
throw new ArgumentNullException("session");
74-
if (accessor==null)
75-
throw new ArgumentNullException("accessor");
76-
77-
this.session = session;
78-
this.accessor = accessor;
79+
this.session = session ?? throw new ArgumentNullException(nameof(session));
80+
this.accessor = accessor ?? throw new ArgumentNullException(nameof(accessor));
7981

8082
stack = new Stack<TrackingStackFrame>();
8183
stack.Push(new TrackingStackFrame());

Extensions/Xtensive.Orm.Tracking/TrackingCompletedEventArgs.cs

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33

44
namespace Xtensive.Orm.Tracking
@@ -21,16 +21,13 @@ public sealed class TrackingCompletedEventArgs : EventArgs
2121
/// <summary>
2222
/// Initializes a new instance of the <see cref="TrackingCompletedEventArgs"/> class.
2323
/// </summary>
24+
/// <param name="session"><see cref="T:Session"/> instance where the <see cref="Changes"/>
25+
/// where collected.</param>
2426
/// <param name="changes">The changes.</param>
2527
public TrackingCompletedEventArgs(Session session, IEnumerable<ITrackingItem> changes)
2628
{
27-
if (session==null)
28-
throw new ArgumentNullException("session");
29-
if (changes == null)
30-
throw new ArgumentNullException("changes");
31-
32-
Session = session;
33-
Changes = changes;
29+
Session = session ?? throw new ArgumentNullException("session");
30+
Changes = changes ?? throw new ArgumentNullException("changes");
3431
}
3532
}
3633
}

Extensions/Xtensive.Orm.Web/AplicationBuilderExtensions.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
using System;
1+
using System;
22
using Xtensive.Core;
33
using Microsoft.AspNetCore.Builder;
44

55
namespace Xtensive.Orm.Web
66
{
7+
/// <summary>
8+
/// Extensions for <see cref="IApplicationBuilder"/>
9+
/// </summary>
710
public static class AplicationBuilderExtensions
811
{
912
/// <summary>

0 commit comments

Comments
 (0)