Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
73 commits
Select commit Hold shift + click to select a range
b225596
Get rid of the compile time warnings
AlexUstinov Sep 22, 2021
66b8e25
Add missing XML comments
AlexUstinov Sep 22, 2021
9de66a1
Get rid of ReadOnlyCollection type
AlexUstinov Sep 22, 2021
52a3044
Get rid of the ReadOnlyList type
AlexUstinov Sep 22, 2021
39226ed
Get rid of the DifferentialDictionary type
AlexUstinov Sep 22, 2021
733eabb
Get rid of the ReadOnlySet type
AlexUstinov Sep 22, 2021
d691845
Get rid of the Set type
AlexUstinov Sep 22, 2021
28c57fb
Get rid of the ReadOnlyDictionary type
AlexUstinov Sep 22, 2021
ec2f22a
Get rid of the SetBase, SetSlim and ISet types
AlexUstinov Sep 22, 2021
955e4d5
Move Cloner to tests
AlexUstinov Sep 22, 2021
727051c
No BinaryFormatter usages in the TypeFormatter
AlexUstinov Sep 22, 2021
afd27a3
Get rid of the ArrayUtils class
AlexUstinov Sep 22, 2021
0afcf37
Switch to Enumerable.Empty<>()
AlexUstinov Sep 22, 2021
e367556
Get rid of the FlagRegistry
AlexUstinov Sep 22, 2021
65f33d2
Get rid of LazyDictionary
AlexUstinov Sep 22, 2021
3e9f0d5
Get rid of the NamedValueCollection
AlexUstinov Sep 22, 2021
197001b
Get rid of the CollectionBase class
AlexUstinov Sep 22, 2021
31a5b3c
Remove excessive code from the CollectionBaseSlim
AlexUstinov Sep 22, 2021
4c379c7
Derive NodeCollection from the CollectionBaseSlim
AlexUstinov Sep 22, 2021
d13f053
Derive the HierarchyDefCollection from the CollectionBaseSlim
AlexUstinov Sep 22, 2021
dd50819
Get rid of the TypeClassifier class
AlexUstinov Sep 22, 2021
fad16d0
Get rid of the unused StoredDomainModelExtensions
AlexUstinov Sep 22, 2021
bb04aea
Get rid of the ThreadSafeDictionary type
AlexUstinov Sep 22, 2021
8b7abe3
Reintroduce the PropertyAccessorDictionary type
AlexUstinov Sep 28, 2021
ec16199
Override AddRange where Add is overriden
AlexUstinov Sep 28, 2021
f91c644
Override Clear where Remove is overriden
AlexUstinov Sep 28, 2021
0b607c9
Fix NRE in the ColumnCollection constructor
AlexUstinov Sep 28, 2021
a7c30ad
Change connection strings to use user/password
AlexUstinov Sep 29, 2021
ef6d4ee
Docker file for mssql2019 + fts
AlexUstinov Sep 29, 2021
d16eaa9
Fix of the concurrency issues in the ModelBuilder
AlexUstinov Sep 29, 2021
acd6cd6
Remove ThreadSafeXxx collections
AlexUstinov Sep 29, 2021
bb55dc1
Delete of commented out ThreadSafeDictionaryTest
AlexUstinov Oct 1, 2021
51952f2
Remove unused collection types
AlexUstinov Sep 29, 2021
59c00de
Replace the ThreadSafeCached<T> with the Lazy<T>
AlexUstinov Sep 29, 2021
09bcf3a
Replace the Triple type with ValueTuple
AlexUstinov Sep 29, 2021
0bddfc2
Use ConcurrentDictionary<TKey, Lazy<TValue>> to prevent heavy paralle…
AlexUstinov Sep 30, 2021
35f1ced
Reduce lock contention probability in DelegateHelper
AlexUstinov Oct 1, 2021
0b636ba
Do not build the same associate in parallel
AlexUstinov Sep 30, 2021
69173a2
Delete the Join string extensions
AlexUstinov Sep 30, 2021
2dfd6cb
Delete the ReverseList extension method
AlexUstinov Sep 30, 2021
17a88c7
Provide XML commens for the Posgres SQL geo types
AlexUstinov Oct 1, 2021
650f641
Hide "BinaryFormatter is obsolete" warn in tests
AlexUstinov Oct 1, 2021
bc30315
Fix warnings & errors after rebase
AlexUstinov Oct 2, 2021
286c635
Make ReadOnlyHashSet.IsReadOnly returning true
AlexUstinov Oct 5, 2021
8be3b72
Implement the ReadOnlyHashSet.CopyTo method
AlexUstinov Oct 5, 2021
f6d919b
Fix build
SergeiPavlov Oct 21, 2021
3d2ad2d
Merge branch 'master' into upstream/net5-compilation-and-delete-obsol…
SergeiPavlov Oct 25, 2021
236243a
Merge remote-tracking branch 'upstream/master' into upstream/net5-com…
SergeiPavlov Nov 5, 2021
519ed30
Merge branch 'master' into upstream/net5-compilation-and-delete-obsol…
SergeiPavlov Nov 9, 2021
a73cf83
Fx build
SergeiPavlov Nov 10, 2021
471c676
Make CachedPropertyAccessors static readonly
SergeiPavlov Nov 17, 2021
e5ac820
Code style issues
SergeiPavlov Nov 17, 2021
78d1b4f
Update Orm/Xtensive.Orm/Orm/Internals/SortingPersistActionGenerator.cs
SergeiPavlov Nov 17, 2021
0a8f51e
Update Orm/Xtensive.Orm/Comparison/AdvancedComparer.cs
SergeiPavlov Nov 17, 2021
c6b4329
Fix name style
SergeiPavlov Nov 17, 2021
bb74b3a
Update Orm/Xtensive.Orm/Collections/TypeRegistry.cs
SergeiPavlov Nov 17, 2021
3303d6e
Update Orm/Xtensive.Orm.SqlServer/Sql.Drivers.SqlServer/v10/CustomSql…
SergeiPavlov Nov 17, 2021
390f0ae
Update Orm/Xtensive.Orm.PostgreSql/Sql.Drivers.PostgreSql/v8_0/Custom…
SergeiPavlov Nov 17, 2021
6c7770f
Update Extensions/Xtensive.Orm.Reprocessing/ExecuteActionStrategy.cs
SergeiPavlov Nov 17, 2021
1aed430
Update Orm/Xtensive.Orm/Orm/Rse/Providers/Compilable/ContainsTablePro…
SergeiPavlov Nov 17, 2021
da93a19
Update Orm/Xtensive.Orm/Orm/Rse/ColumnGroupCollection.cs
SergeiPavlov Nov 17, 2021
a998027
Fix name style
SergeiPavlov Nov 17, 2021
b77a4d7
Update Orm/Xtensive.Orm/Conversion/AdvancedConverter.cs
SergeiPavlov Nov 17, 2021
e54c242
Fix name style
SergeiPavlov Nov 17, 2021
564907b
Move methods after properties
SergeiPavlov Nov 17, 2021
61d6e1b
relocate nested class
SergeiPavlov Nov 17, 2021
249a76c
Make PrefetchActionContainer.fields IReadOnlyList<>
SergeiPavlov Nov 17, 2021
e3e4850
Use SelectToList in PrefetchActionContainer
SergeiPavlov Nov 17, 2021
123db33
Refactor GeneratedTypes dictionary
SergeiPavlov Nov 17, 2021
52b1590
Add EnsureNotLocked() into AddRange()
SergeiPavlov Nov 18, 2021
48c5fec
Merge branch 'master' into upstream/net5-compilation-and-delete-obsol…
SergeiPavlov Nov 24, 2021
f8bcda6
Add GenerateAssemblyInfo/GenerateTargetFrameworkAttribute to Xtensive…
SergeiPavlov Nov 24, 2021
b4204da
Rename back PostgresqlSqlGeometryDml -> PostgresqlSqlDml
SergeiPavlov Nov 30, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
12 changes: 12 additions & 0 deletions Containers/do-sqlserver2019
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
FROM mcr.microsoft.com/mssql/server:2019-CU12-ubuntu-20.04
USER root
RUN apt-get -y update && \
apt-get install -yq curl apt-transport-https && \
apt-get install -y gnupg2 && \
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add - && \
curl https://packages.microsoft.com/config/ubuntu/20.04/mssql-server-2019.list | tee /etc/apt/sources.list.d/mssql-server.list && \
apt-get update && \
apt-get install -y mssql-server-fts && \
apt-get clean && \
rm -rf /var/lib/apt/lists
USER mssql
5 changes: 4 additions & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,15 @@
<DoGeneratePackage Condition="$(MSBuildProjectName) == 'Xtensive.Orm.Manual'">false</DoGeneratePackage>
<DoGeneratePackage Condition="$(MSBuildProjectName) == 'TestCommon'">false</DoGeneratePackage>
<DoGeneratePackage Condition="$(MSBuildProjectName.Contains('Tests')) == 'true'">false</DoGeneratePackage>

<!-- Disable "BinaryFormatter is obsolete" warnings for test projects -->
<NoWarn Condition="$(MSBuildProjectName.Contains('Tests')) == 'true'">$(NoWarn);SYSLIB0011</NoWarn>
</PropertyGroup>

<PropertyGroup>
<NoLogo>true</NoLogo>
<SuppressNETCoreSdkPreviewMessage>true</SuppressNETCoreSdkPreviewMessage>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<LangVersion>9.0</LangVersion>
<SolutionDir Condition="$(SolutionDir) == ''">$([MSBuild]::EnsureTrailingSlash(
$([MSBuild]::GetDirectoryNameOfFileAbove('$(MSBuildThisFileDirectory)', 'Orm.sln'))))</SolutionDir>
Expand Down
18 changes: 10 additions & 8 deletions Extensions/Xtensive.Orm.BulkOperations/Internals/SetOperation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -73,16 +73,18 @@ private void PreprocessStructures()
ex = Expression.Call(
typeof (Queryable), "Select", new[] {parameter.Type, f.ValueType}, ex, lambda);
ex = Expression.Call(typeof (Queryable), call.Method.Name, new[] {f.ValueType}, ex);*/
else
{
else {
//ex = Expression.Convert(ex, typeof(Structure));
var list = new List<FieldInfo> { f };
while (list.Last().Parent != setDescriptor.Field)
list.Add(f.Parent);
list.Reverse();
var last = f;
var fields = new List<FieldInfo> { last };
while (last.Parent != setDescriptor.Field) {
last = f.Parent;
fields.Add(last);
}
Expression member = ex;
foreach (FieldInfo f2 in list)
member = Expression.MakeMemberAccess(member, f2.UnderlyingProperty);
for (var i = fields.Count; i-- > 0;) {
member = Expression.MakeMemberAccess(member, fields[i].UnderlyingProperty);
}
ex = member;
}
Descriptors.Add(new SetDescriptor(f, setDescriptor.Parameter, ex));
Expand Down
12 changes: 9 additions & 3 deletions Extensions/Xtensive.Orm.Reprocessing/ExecuteActionStrategy.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@ namespace Xtensive.Orm.Reprocessing
/// </summary>
public abstract class ExecuteActionStrategy : IExecuteActionStrategy
{
private static readonly ConcurrentDictionary<Type, IExecuteActionStrategy> Singletons =
new ConcurrentDictionary<Type, IExecuteActionStrategy>();
private static readonly ConcurrentDictionary<Type, Lazy<IExecuteActionStrategy>> Singletons =
new ConcurrentDictionary<Type, Lazy<IExecuteActionStrategy>>();

/// <summary>
/// Gets singleton of the <see cref="HandleReprocessableExceptionStrategy"/>.
Expand Down Expand Up @@ -137,7 +137,13 @@ public static IExecuteActionStrategy GetSingleton(Type type)
if (type == typeof(NoReprocessStrategy)) {
return NoReprocess;
}
return Singletons.GetOrAdd(type, a => (IExecuteActionStrategy) Activator.CreateInstance(type));

return Singletons.GetOrAdd(type, ActionStrategyFactory).Value;

static Lazy<IExecuteActionStrategy> ActionStrategyFactory(Type t)
{
return new Lazy<IExecuteActionStrategy>(() => (IExecuteActionStrategy) Activator.CreateInstance(t));
}
}

#region Non-public methods
Expand Down
4 changes: 2 additions & 2 deletions Extensions/Xtensive.Orm.Security/Role.cs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ namespace Xtensive.Orm.Security
public abstract class Role : Entity, IRole
{
private List<Permission> permissions;
private ReadOnlyList<Permission> readOnlyPermissions;
private IList<Permission> readOnlyPermissions;

/// <inheritdoc/>
[NotNullConstraint(IsImmediate = true)]
Expand Down Expand Up @@ -57,7 +57,7 @@ protected override void OnInitialize()
{
base.OnInitialize();
permissions = new List<Permission>();
readOnlyPermissions = new ReadOnlyList<Permission>(permissions);
readOnlyPermissions = permissions.AsReadOnly();
RegisterPermissions();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<IsPackable>false</IsPackable>
<SignAssembly>true</SignAssembly>
<AssemblyOriginatorKeyFile>$(ExtensionsKeyFile)</AssemblyOriginatorKeyFile>
<GenerateAssemblyInfo>false</GenerateAssemblyInfo>
<GenerateTargetFrameworkAttribute>false</GenerateTargetFrameworkAttribute>
</PropertyGroup>
<Import Project="$(SolutionDir)MSBuild\DataObjects.Net.InternalBuild.targets" />
<ItemGroup>
Expand Down
2 changes: 1 addition & 1 deletion Extensions/Xtensive.Orm.Web/SessionManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ public static SessionManager Demand()
/// </summary>
public bool HasSession
{
get { return sessionAndTransactionPair.Value != null && sessionAndTransactionPair.Value.First != null; }
get { return sessionAndTransactionPair.Value.First != null; }
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ namespace Xtensive.Orm.Providers.Firebird
/// </summary>
public class DomainHandler : Providers.DomainHandler
{
/// <inheritdoc/>
protected override ICompiler CreateCompiler(CompilerConfiguration configuration)
{
return new SqlCompiler(Handlers, configuration);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ protected override SqlDriver CreateDriver(string connectionString, SqlDriverConf
connectionString, GetVersionFromServerVersionString(connection.ServerVersion), defaultSchema);
}

/// <inheritdoc/>
protected override async Task<SqlDriver> CreateDriverAsync(
string connectionString, SqlDriverConfiguration configuration, CancellationToken token)
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@ internal class ServerInfoProvider : Info.ServerInfoProvider
// The limit is 64kB for statement text, 64kB for compiled BLR and 48kB for execution plan.
private const int MaxTextLength = int.MaxValue;

private readonly string databaseName;
private readonly string defaultSchemaName;

public override EntityInfo GetCollationInfo()
{
return null;
Expand Down
5 changes: 1 addition & 4 deletions Orm/Xtensive.Orm.Manual/Upgrade/Model_2/Upgrader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@
// Created by: Alex Kofman
// Created: 2009.11.12

using System;
using System.Diagnostics;
using Xtensive.Collections;
using Xtensive.Modelling.Comparison.Hints;
using System.Collections.Generic;
using Xtensive.Orm.Upgrade;

namespace Xtensive.Orm.Manual.Upgrade.Model_2
Expand Down
4 changes: 1 addition & 3 deletions Orm/Xtensive.Orm.Manual/Upgrade/Model_3/Upgrader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@
// Created by: Alex Kofman
// Created: 2009.11.12

using System;
using Xtensive.Collections;
using Xtensive.Modelling.Comparison.Hints;
using System.Collections.Generic;
using Xtensive.Orm.Upgrade;

namespace Xtensive.Orm.Manual.Upgrade.Model_3
Expand Down
4 changes: 1 addition & 3 deletions Orm/Xtensive.Orm.Manual/Upgrade/Model_4/Upgrader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
// Created by: Alex Kofman
// Created: 2009.11.19

using System;
using System.Collections.Generic;
using System.Linq;
using Xtensive.Collections;
using Xtensive.Modelling.Comparison.Hints;
using Xtensive.Orm.Upgrade;

namespace Xtensive.Orm.Manual.Upgrade.Model_4
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ namespace Xtensive.Orm.Providers.MySql
/// </summary>
public class DomainHandler : Providers.DomainHandler
{
/// <inheritdoc/>
protected override ICompiler CreateCompiler(CompilerConfiguration configuration)
{
return new SqlCompiler(Handlers, configuration);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ internal class ServerInfoProvider : Info.ServerInfoProvider
private const int MaxIdentifierLength = 64;
private const int DoNotKnow = int.MaxValue;

private readonly string databaseName;
private readonly string defaultSchemaName;

/// <inheritdoc/>
public override EntityInfo GetCollationInfo()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ namespace Xtensive.Orm.Providers.Oracle
/// </summary>
public class DomainHandler : Providers.DomainHandler
{
/// <inheritdoc/>
protected override ICompiler CreateCompiler(CompilerConfiguration configuration)
{
return new SqlCompiler(Handlers, configuration);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ private static Version ParseVersion(string version)
return new Version(items[0], items[1], items[2], items[3]);
}

/// <inheritdoc/>
protected override string BuildConnectionString(UrlInfo url)
{
SqlHelper.ValidateConnectionUrl(url);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ internal class ServerInfoProvider : Info.ServerInfoProvider
private const int MaxIdentifierLength = 30;
private const int DoNotKnow = int.MaxValue;

private readonly string databaseName;
private readonly string defaultSchemaName;

public override EntityInfo GetCollationInfo()
{
return null;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@ namespace Xtensive.Orm.Providers.PostgreSql
/// </summary>
public class DomainHandler : Providers.DomainHandler
{
/// <inheritdoc/>
protected override ICompiler CreateCompiler(CompilerConfiguration configuration) =>
new SqlCompiler(Handlers, configuration);

/// <inheritdoc/>
protected override IEnumerable<Type> GetProviderCompilerContainers()
{
return base.GetProviderCompilerContainers()
Expand Down
Loading