Skip to content

Commit 037a542

Browse files
committed
Merge branch '6.0' into 6.0-test-fixes
2 parents 2bd3969 + f90d32c commit 037a542

24 files changed

+102
-752
lines changed

ChangeLog/6.0.6_dev.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,24 @@
1+
[main] Obsolete CompilerContainerAttribute.ExtensionType property is removed
2+
[main] Obsolete BuildingContext.Current and BuildingContext.Demand() are removed
3+
[main] Obsolete DomainConfiguration.DefaultSectionName field is removed
4+
[main] Obsolete IOperationSection.Replay() and its implementations are removed
5+
[main] Obsolete OperationCapturer.Attach(IOperationLogger) is removed
6+
[main] Obsolete ProviderFeatures.SingleSessionAccess and ServerFeatures.SingleSessionAccess are removed
7+
[main] Obsolete DomainUpgradeModeExtensions.RequiresInitializingStage() is removed
8+
[main] Obsolete UpgradeContext.OriginalConfiguration property is removed
9+
[main] Obsolete UpgradeStage.Initializing is removed
10+
[main] Obsolete parameterless constructor of RegexConstraint is removed
11+
[main] Obsolete PropertyValidator.Mode property is removed
12+
[main] Obsolete ConstraintMode type is removed
13+
[main] Obsolete EntityExtensions.IsRemoved() is removed
14+
[main] Obsolete QueryableExtensions.Remove() is removed
15+
[main] Obsolete Transaction.Open() methods are removed
16+
[main] Obsolete TransactionalExtensions.InvokeTransactionally() methods are removed
17+
[main] Obsolete TypeExtensions.GetTypeInfo() methods are removed
18+
[main] Obsolete VersionCapturer.Attach() is removed
19+
[main] Obsolete VersionValidator.Attach() property is removed
20+
[main] Obsolete WellKnown class members are removed
21+
[main] Obsolete ServerFeatures property is removed
122
[main] Fixed possible cases of broken serialization due to comparers
223
[main] Fixed rare cases of insert wrong data into some table columns for SingleTable hierarchies
324
[main] Exception message about unsupported by storage type became more informative

Orm/Xtensive.Orm/Orm/Attributes/CompilerContainerAttribute.cs

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// Copyright (C) 2003-2010 Xtensive LLC.
2-
// All rights reserved.
3-
// For conditions of distribution and use, see license.
1+
// Copyright (C) 2009-2021 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: Elena Vakhtina
55
// Created: 2009.03.30
66

@@ -18,12 +18,6 @@ namespace Xtensive.Orm
1818
[MeansImplicitUse]
1919
public sealed class CompilerContainerAttribute : Attribute
2020
{
21-
/// <summary>
22-
/// Gets the target type (i.e. type this compiler translates to).
23-
/// </summary>
24-
[Obsolete("Use TargetType instead")]
25-
public Type ExtensionType { get { return TargetType; } }
26-
2721
/// <summary>
2822
/// Gets the target type (i.e. type this compiler translates to).
2923
/// </summary>

Orm/Xtensive.Orm/Orm/Building/BuildingContext.cs

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// Copyright (C) 2003-2010 Xtensive LLC.
2-
// All rights reserved.
3-
// For conditions of distribution and use, see license.
1+
// Copyright (C) 2007-2021 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: 2007.09.03
66

@@ -29,29 +29,6 @@ public sealed class BuildingContext
2929
internal Graph<TypeDef> DependencyGraph { get; private set; }
3030
internal Validator Validator { get; private set; }
3131

32-
#region Current property & Demand() method
33-
34-
/// <summary>
35-
/// Gets the current <see cref="BuildingContext"/>.
36-
/// </summary>
37-
[Obsolete("This property will be removed in future versions.")]
38-
public static BuildingContext Current { get { return BuildingScope.Context; } }
39-
40-
/// <summary>
41-
/// Gets the current <see cref="BuildingContext"/>, or throws <see cref="InvalidOperationException"/>, if active context is not found.
42-
/// </summary>
43-
/// <returns>Current context.</returns>
44-
[Obsolete("This method will be removed in future versions.")]
45-
public static BuildingContext Demand()
46-
{
47-
var current = BuildingScope.Context;
48-
if (current==null)
49-
throw Exceptions.ContextRequired<BuildingContext, BuildingScope>();
50-
return current;
51-
}
52-
53-
#endregion
54-
5532
/// <summary>
5633
/// Gets the configuration of the building <see cref="Orm.Domain"/>.
5734
/// </summary>

Orm/Xtensive.Orm/Orm/Configuration/DomainConfiguration.cs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// Copyright (C) 2003-2010 Xtensive LLC.
2-
// All rights reserved.
3-
// For conditions of distribution and use, see license.
1+
// Copyright (C) 2007-2021 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: 2007.08.03
66

@@ -22,13 +22,6 @@ public class DomainConfiguration : ConfigurationBase
2222
{
2323
#region Defaults
2424

25-
/// <summary>
26-
/// Default <see cref="SectionName"/> value:
27-
/// "<see langword="Xtensive.Orm" />".
28-
/// </summary>
29-
[Obsolete("Use WellKnown.DefaultConfigurationSection instead."), UsedImplicitly]
30-
public const string DefaultSectionName = WellKnown.DefaultConfigurationSection;
31-
3225
/// <summary>
3326
/// Default <see cref="DomainConfiguration.KeyCacheSize"/> value:
3427
/// <see langword="16*1024" />.

Orm/Xtensive.Orm/Orm/EntityExtensions.cs

Lines changed: 0 additions & 32 deletions
This file was deleted.

Orm/Xtensive.Orm/Orm/Interfaces/IOperationSequence.cs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// Copyright (C) 2010 Xtensive LLC.
2-
// All rights reserved.
3-
// For conditions of distribution and use, see license.
1+
// Copyright (C) 2010-2021 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: Alex Yakunin
55
// Created: 2010.03.01
66

@@ -14,13 +14,6 @@ namespace Xtensive.Orm
1414
/// </summary>
1515
public interface IOperationSequence : IEnumerable<IOperation>, Core.IOperationSequence
1616
{
17-
/// <summary>
18-
/// Applies this operation sequence to the <see cref="Session.Current"/> session.
19-
/// </summary>
20-
/// <returns>Key mapping.</returns>
21-
[Obsolete("Use Replay(Session) method instead.")]
22-
KeyMapping Replay();
23-
2417
/// <summary>
2518
/// Applies this operation sequence to the specified session.
2619
/// </summary>

Orm/Xtensive.Orm/Orm/OperationLog.cs

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// Copyright (C) 2003-2010 Xtensive LLC.
2-
// All rights reserved.
3-
// For conditions of distribution and use, see license.
1+
// Copyright (C) 2009-2021 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: Alexis Kochetov
55
// Created: 2009.10.22
66

@@ -50,13 +50,6 @@ public void Log(IEnumerable<IOperation> source)
5050
}
5151
}
5252

53-
/// <inheritdoc/>
54-
[Obsolete("Use Replay(Session) instead.")]
55-
public KeyMapping Replay()
56-
{
57-
return Replay(Session.Demand());
58-
}
59-
6053
/// <inheritdoc/>
6154
public KeyMapping Replay(Session session)
6255
{

Orm/Xtensive.Orm/Orm/Operations/OperationCapturer.cs

Lines changed: 3 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// Copyright (C) 2003-2010 Xtensive LLC.
2-
// All rights reserved.
3-
// For conditions of distribution and use, see license.
1+
// Copyright (C) 2009-2021 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: Alexis Kochetov
55
// Created: 2009.10.22
66

@@ -101,20 +101,6 @@ private void DetachEventHandlers()
101101

102102
// Factory methods
103103

104-
/// <summary>
105-
/// Attaches the operation capturer to the current session.
106-
/// </summary>
107-
/// <param name="operations">The operation logger to append captured operations to.</param>
108-
/// <returns>
109-
/// A newly created <see cref="OperationCapturer"/> attached
110-
/// to the current session.
111-
/// </returns>
112-
[Obsolete("Use Attach(Session, IOperationLogger) instead")]
113-
public static OperationCapturer Attach(IOperationLogger operations)
114-
{
115-
return Attach(Session.Demand(), operations);
116-
}
117-
118104
/// <summary>
119105
/// Attaches the operation capturer to the specified session.
120106
/// </summary>

Orm/Xtensive.Orm/Orm/Providers/ProviderFeatures.cs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// Copyright (C) 2003-2010 Xtensive LLC.
2-
// All rights reserved.
3-
// For conditions of distribution and use, see license.
1+
// Copyright (C) 2009-2021 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: 2009.08.28
66

@@ -76,10 +76,5 @@ public enum ProviderFeatures : long
7676
Paging = Take | Skip,
7777
NativePaging = NativeTake | NativeSkip,
7878
Batches = DdlBatches | DmlBatches,
79-
80-
// Obsolete features
81-
[Obsolete("Use ProviderFeatures.ExclusiveWriterConnection instead.")]
82-
SingleSessionAccess = ExclusiveWriterConnection,
83-
8479
}
8580
}

Orm/Xtensive.Orm/Orm/QueryableExtensions.cs

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// Copyright (C) 2003-2010 Xtensive LLC.
2-
// All rights reserved.
3-
// For conditions of distribution and use, see license.
1+
// Copyright (C) 2009-2021 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 Gamzov
55
// Created: 2009.05.06
66

@@ -241,29 +241,6 @@ public static IQueryable<TResult> LeftJoin<TOuter, TInner, TKey, TResult>(this I
241241
return outer.Provider.CreateQuery<TResult>(expression);
242242
}
243243

244-
/// <summary>
245-
/// Removes the specified entities using <see cref="Session.Remove{T}"/> method of <see cref="Session"/>.
246-
/// </summary>
247-
/// <typeparam name="T">Entity type.</typeparam>
248-
/// <param name="entities">The entities.</param>
249-
/// <exception cref="ReferentialIntegrityException">
250-
/// Entity is associated with another entity with <see cref="OnRemoveAction.Deny"/> on-remove action.
251-
/// </exception>
252-
[Obsolete("Use Session.Remove() instead.")]
253-
public static void Remove<T>([InstantHandle] this IEnumerable<T> entities)
254-
where T : IEntity
255-
{
256-
var session = Session.Current;
257-
if (session != null)
258-
session.Remove(entities);
259-
else {
260-
var items = entities.Where(e => e != null).ToList();
261-
if (items.Count == 0)
262-
return;
263-
items[0].Session.Remove(items);
264-
}
265-
}
266-
267244
/// <summary>
268245
/// Runs query to database asynchronously and returns completed task for other <see cref="IQueryable{T}"/>.
269246
/// </summary>

Orm/Xtensive.Orm/Orm/Session.Validation.cs

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
// Copyright (C) 2003-2010 Xtensive LLC.
2-
// All rights reserved.
3-
// For conditions of distribution and use, see license.
1+
// Copyright (C) 2008-2021 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: Alex Yakunin
55
// Created: 2008.11.07
66

@@ -22,19 +22,13 @@ public partial class Session
2222
/// Validates all instances registered in <see cref="ValidationContext"/>
2323
/// of current <see cref="Session"/>.
2424
/// </summary>
25-
public void Validate()
26-
{
27-
ValidationContext.Validate(ValidationReason.UserRequest);
28-
}
25+
public void Validate() => ValidationContext.Validate(ValidationReason.UserRequest);
2926

3027
/// <summary>
3128
/// Validates all registered entities similar to <see cref="Validate"/> method
32-
/// and returns all validation exceptions.
29+
/// and returns all validation errors.
3330
/// </summary>
34-
/// <returns>List exceptions occured during validation.</returns>
35-
public IList<EntityErrorInfo> ValidateAndGetErrors()
36-
{
37-
return ValidationContext.ValidateAndGetErrors();
38-
}
31+
/// <returns>List errors occured during validation.</returns>
32+
public IList<EntityErrorInfo> ValidateAndGetErrors() => ValidationContext.ValidateAndGetErrors();
3933
}
4034
}

0 commit comments

Comments
 (0)