Skip to content

Commit 52fac08

Browse files
committed
Merge remote-tracking branch 'upstream/master' into upstream/staticInitializers
2 parents 746dbce + b852fb7 commit 52fac08

333 files changed

Lines changed: 1848 additions & 6641 deletions

File tree

Some content is hidden

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

ChangeLog/7.1.0-dev.txt

Lines changed: 67 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,67 @@
1-
[main] Introduced IQueryable<T>.Tag() extensions allowing to add tags to result SQL statement
1+
[main] ThreadSafeCache is removed
2+
[main] INamedValueCollection and its the only implementer NamedValueCollection are removed
3+
[main] ICollectionChangeNotifier, CollectionChangeNotifierEventArgs are removed
4+
[main] ArrayUtils class is removed
5+
[main] ISet<T> interface is removed and all usages are replaced with .Net ISet<T>
6+
[main] Set<T>, SetSlim<T>, ReadOnlySet<T> collections and abstract SetBase are removed
7+
[main] ReadOnlyList<T> is removed
8+
[main] ReadOnlyCollection<T>
9+
[main] ReadOnlyDictionary<TKey, TValue> is removed
10+
[main] ThreadSafeDictionary is removed
11+
[main] ThreadSafeList struct is removed
12+
[main] TypeClassifier collection is removed
13+
[main] LazyDictionary is removed
14+
[main] FlagRegistry is removed
15+
[main] EnumerableUtils<T> is removed
16+
[main] DifferentialDictionary and DifferentialDictionaryDifference are removed
17+
[main] CollectionBase<T> is removed
18+
[main] StringExtensions.Join() methods are removed
19+
[main] CollectionExtensions.ReverseList() method is removed
20+
[main] ThreadSafeCached type is removed
21+
[main] Triplet<T> and Triplet<TFirst,TSecond,TThird> are removed
22+
[main] Introduced IQueryable<T>.Tag() extensions allowing to add tags to result SQL statement
23+
[main] ReadOnlyHashSet<T> now implements .Net ISet and IReadOnlySet instead of removed ISet and IReadOnly
24+
[main] NativeTypeClassifier collection now inherits ClassifiedCollection directly
25+
[main] FlagCollection.Keys return type has changed from removed ReadOnlyList<T> to .Net IReadOnlyList<T>
26+
[main] CollectionBaseSlim<T> no longer implements IList<T> and ICollection but implements ICollection<T> and IReadOnlyList<T>
27+
[main] AggregateException.Exceptions property changed its return type to IReadOnlyList<Exception>
28+
[main] AggregateException constuctors get array of exceptions instead of IEnumerable<Exception>
29+
[main] CopyDataHint.CopiedColumns property changed its return type to IReadOnlyList<Pair<string>>
30+
[main] DateHint.Identitites property changed its return type to IReadOnlyList<IdentityPair>
31+
[main] UpdateDataHint.UpdateParameter property changed its return type to IReadOnlyList<Pair<string, object>>
32+
[main] IUpgrader methods now return IReadOnlyList<NodeAction>
33+
[main] PropertyAccessorDictionary has changed API due to change its base type and interfaces
34+
[main] FullTextIndexDefCollection changed its base type to CollectionBaseSlim<FullTextIndexDef>
35+
[main] HierarchyDefCollection changed its base type to CollectionBaseSlim<HierarchyDef>
36+
[main] HierarchyDefCollection and TypeDefCollection changed events set due to change of base type
37+
[main] SessionConfiguration collection API changed due to changes in base type CollectionBaseSlim<T>
38+
[main] IGenerationTerm.Terms changed its return type to IReadOnlyList<string>
39+
[main] IProximityTerm.Terms changed its return type to IReadOnlyList<IProximityOperand>
40+
[main] IOperation properties (PrecedingOperations, FollowingOperations, UndoOperations, IdentifiedEntities) changed return type
41+
[main] HierarchyInfo.Types changed its return type to IReadOnlyList<TypeInfo>
42+
[main] IndexInfo.Columns changed its return type to IReadOnlyList<ColumnInfo>
43+
[main] KeyInfo's Fields and Columns properties changed to ReadOnlyList<FieldInfo> and IReadOnlyList<ColumnInfo> respectively
44+
[main] TypeIndexInfoCollection.RealPrimaryIndexes property changed its return type to IReadOnlyList<IndexInfo>
45+
[main] TypeIndexInfoCollection.GetIndexesContainingAllData() method changed its return type to IReadOnlyList<IndexInfo>
46+
[main] TypeInfo members that returned IList<T> changed return type to IReadOnlyList<TypeInfo>
47+
[main] PersistRequestBuilderContext.AffectedIndexes changed return type to IReadOnlyList<IndexInfo>
48+
[main] QueryRowFilterParameterBinding.RowTypeMapping changed return type to IReadOnlyList<TypeMapping>
49+
[main] ProviderInfo.SupportedTypes changed return type to IReadOnlySet<Type>
50+
[main] SessionHandler.Prefetch/PrefetchAsync changed type of one of incoming parameters from IList<T> to IReadOnlyList<T>
51+
[main] ContainsTableProvider.TargetColumns changed return type to IReadOnlyList<FullTextColumnInfo>
52+
[main] ColumnCollection is no longer inherited from ReadOnlyList<Column> but implements IReadOnlyList<Column>
53+
[main] ColumnGroupCollection is no longer inherited from ReadOnlyCollection<Column> but implements IReadOnlyList<ColumnGroup>
54+
[main] ChangeFieldTypeHint.AffectedColumns changed return type to IReadOnlyList<string>
55+
[main] RemoveFieldHint.AffectedColumns changed return type to IReadOnlyList<string>
56+
[main] RemoveTypeHint.AffectedTables changed return type to IReadOnlyList<string>
57+
[main] SchemaComparisonResult.UnsafeActions changed return type to IReadOnlyList<NodeAction>
58+
[main] UpgradeContext.Hints changed return type to ISet<UpgradeHint>
59+
[main] UpgradeContext.Modules changed return type to IReadOnlyList<IModule>
60+
[main] UpgradeContext.OrderedUpgradeHandlers changed return type to IReadOnlyList<IUpgradeHandler>
61+
[main] UpgradeContext.UpgradeHandlers changed return type to IReadOnlyDictionary<Assembly, IUpgradeHandler>
62+
[main] UpgradeHandler.AddUpgradeHints() and .AddAutoHints() now take ISet<T> from .Net instead of ORM's ISet<T>
63+
[main] KeyMapping.Map changed type to IReadOnlyDictionary<Key, Key>
64+
[main] InterfaceMapping's properties of ReadOnlyList<T> type changed the type to IReadOnlyList<T>
65+
[main] Node's IncomingConnections and OutgoingConnections properties changed types to IReadOnlyList<NodeConnection<TNodeItem, TConnectionItem>>
66+
[main] SqlCompilerConfiguration's SchemaMapping and DatabaseMapping changed return types to IReadOnlyDictionary<string, string>
67+
[main] TypeMappingRegistry.Mappings and .ReverseMappings changed return types to IReadOnlyDictionary<TKey, TValue>

Containers/do-sqlserver2019

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
FROM mcr.microsoft.com/mssql/server:2019-CU12-ubuntu-20.04
2+
USER root
3+
RUN apt-get -y update && \
4+
apt-get install -yq curl apt-transport-https && \
5+
apt-get install -y gnupg2 && \
6+
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
7+
curl https://packages.microsoft.com/config/ubuntu/20.04/mssql-server-2019.list | tee /etc/apt/sources.list.d/mssql-server.list && \
8+
apt-get update && \
9+
apt-get install -y mssql-server-fts && \
10+
apt-get clean && \
11+
rm -rf /var/lib/apt/lists
12+
USER mssql

Directory.Build.props

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,9 @@
3232
<DoGeneratePackage Condition="$(MSBuildProjectName) == 'Xtensive.Orm.Manual'">false</DoGeneratePackage>
3333
<DoGeneratePackage Condition="$(MSBuildProjectName) == 'TestCommon'">false</DoGeneratePackage>
3434
<DoGeneratePackage Condition="$(MSBuildProjectName.Contains('Tests')) == 'true'">false</DoGeneratePackage>
35+
36+
<!-- Disable "BinaryFormatter is obsolete" warnings for test projects -->
37+
<NoWarn Condition="$(MSBuildProjectName.Contains('Tests')) == 'true'">$(NoWarn);SYSLIB0011</NoWarn>
3538
</PropertyGroup>
3639

3740
<PropertyGroup>

Extensions/Xtensive.Orm.BulkOperations/Internals/SetOperation.cs

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,16 +73,18 @@ private void PreprocessStructures()
7373
ex = Expression.Call(
7474
typeof (Queryable), "Select", new[] {parameter.Type, f.ValueType}, ex, lambda);
7575
ex = Expression.Call(typeof (Queryable), call.Method.Name, new[] {f.ValueType}, ex);*/
76-
else
77-
{
76+
else {
7877
//ex = Expression.Convert(ex, typeof(Structure));
79-
var list = new List<FieldInfo> { f };
80-
while (list.Last().Parent != setDescriptor.Field)
81-
list.Add(f.Parent);
82-
list.Reverse();
78+
var last = f;
79+
var fields = new List<FieldInfo> { last };
80+
while (last.Parent != setDescriptor.Field) {
81+
last = f.Parent;
82+
fields.Add(last);
83+
}
8384
Expression member = ex;
84-
foreach (FieldInfo f2 in list)
85-
member = Expression.MakeMemberAccess(member, f2.UnderlyingProperty);
85+
for (var i = fields.Count; i-- > 0;) {
86+
member = Expression.MakeMemberAccess(member, fields[i].UnderlyingProperty);
87+
}
8688
ex = member;
8789
}
8890
Descriptors.Add(new SetDescriptor(f, setDescriptor.Parameter, ex));

Extensions/Xtensive.Orm.Reprocessing/ExecuteActionStrategy.cs

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ namespace Xtensive.Orm.Reprocessing
1111
/// </summary>
1212
public abstract class ExecuteActionStrategy : IExecuteActionStrategy
1313
{
14-
private static readonly ConcurrentDictionary<Type, IExecuteActionStrategy> Singletons =
15-
new ConcurrentDictionary<Type, IExecuteActionStrategy>();
14+
private static readonly ConcurrentDictionary<Type, Lazy<IExecuteActionStrategy>> Singletons =
15+
new ConcurrentDictionary<Type, Lazy<IExecuteActionStrategy>>();
1616

1717
/// <summary>
1818
/// Gets singleton of the <see cref="HandleReprocessableExceptionStrategy"/>.
@@ -137,7 +137,13 @@ public static IExecuteActionStrategy GetSingleton(Type type)
137137
if (type == typeof(NoReprocessStrategy)) {
138138
return NoReprocess;
139139
}
140-
return Singletons.GetOrAdd(type, a => (IExecuteActionStrategy) Activator.CreateInstance(type));
140+
141+
return Singletons.GetOrAdd(type, ActionStrategyFactory).Value;
142+
143+
static Lazy<IExecuteActionStrategy> ActionStrategyFactory(Type t)
144+
{
145+
return new Lazy<IExecuteActionStrategy>(() => (IExecuteActionStrategy) Activator.CreateInstance(t));
146+
}
141147
}
142148

143149
#region Non-public methods

Extensions/Xtensive.Orm.Security/Role.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ namespace Xtensive.Orm.Security
1111
public abstract class Role : Entity, IRole
1212
{
1313
private List<Permission> permissions;
14-
private ReadOnlyList<Permission> readOnlyPermissions;
14+
private IList<Permission> readOnlyPermissions;
1515

1616
/// <inheritdoc/>
1717
[NotNullConstraint(IsImmediate = true)]
@@ -57,7 +57,7 @@ protected override void OnInitialize()
5757
{
5858
base.OnInitialize();
5959
permissions = new List<Permission>();
60-
readOnlyPermissions = new ReadOnlyList<Permission>(permissions);
60+
readOnlyPermissions = permissions.AsReadOnly();
6161
RegisterPermissions();
6262
}
6363

Extensions/Xtensive.Orm.Web.Tests/Xtensive.Orm.Web.Tests.csproj

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,8 @@
44
<IsPackable>false</IsPackable>
55
<SignAssembly>true</SignAssembly>
66
<AssemblyOriginatorKeyFile>$(ExtensionsKeyFile)</AssemblyOriginatorKeyFile>
7+
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
8+
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
79
</PropertyGroup>
810
<Import Project="$(SolutionDir)MSBuild\DataObjects.Net.InternalBuild.targets" />
911
<ItemGroup>

Extensions/Xtensive.Orm.Web/SessionManager.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ public static SessionManager Demand()
7575
/// </summary>
7676
public bool HasSession
7777
{
78-
get { return sessionAndTransactionPair.Value != null && sessionAndTransactionPair.Value.First != null; }
78+
get { return sessionAndTransactionPair.Value.First != null; }
7979
}
8080

8181
/// <summary>

Orm/Xtensive.Orm.Firebird/Orm.Providers.Firebird/DomainHandler.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ namespace Xtensive.Orm.Providers.Firebird
1313
/// </summary>
1414
public class DomainHandler : Providers.DomainHandler
1515
{
16+
/// <inheritdoc/>
1617
protected override ICompiler CreateCompiler(CompilerConfiguration configuration)
1718
{
1819
return new SqlCompiler(Handlers, configuration);

Orm/Xtensive.Orm.Firebird/Sql.Drivers.Firebird/DriverFactory.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ protected override SqlDriver CreateDriver(string connectionString, SqlDriverConf
4242
connectionString, GetVersionFromServerVersionString(connection.ServerVersion), defaultSchema);
4343
}
4444

45+
/// <inheritdoc/>
4546
protected override async Task<SqlDriver> CreateDriverAsync(
4647
string connectionString, SqlDriverConfiguration configuration, CancellationToken token)
4748
{

0 commit comments

Comments
 (0)