Skip to content

Commit baa8098

Browse files
authored
Merge pull request #335 from DataObjects-NET/master-remove-obsoletes
Removes obsolete types / members of types.
2 parents 0919343 + 8bbe43c commit baa8098

14 files changed

Lines changed: 13 additions & 339 deletions

File tree

ChangeLog/7.2.0-Beta-1-dev.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,18 @@
1010
[main] TemporaryTableDescriptor changed interface to IMultiRecordPersistDescriptor, fully compatible with IPersistDescriptor
1111
[main] SqlNode.Clone() method now returns SqlNode to take advantage of C# covariant returns and reduce casts overhead
1212
[main] Improved exception handling if some appered during asynchronous Session opening
13+
[main] Obsolete LockableExtensions.EnsureNotLocked is removed
14+
[main] Obsolete DomainConfiguration.DefaultVersioningPolicy is removed
15+
[main] Obsolete TypeInfo methods (GetImplementors(), GetInterfaces(), GetDescendants(), GetAncestors() and GetRoot()) are removed
16+
[main] Obsolete TypeInfoCollection FindXXX methods are removed
17+
[main] Obsolete PersistRequest constructor removed
18+
[main] Obsolete PersistRequestBuilder.CreatePersistRequest() method is removed.
19+
[main] Obsolete StorageDriver.Compile(ISqlCompileUnit, NodeConfigruation) method is removed
20+
[main] Obsolete MethodHelper.GetMethod() and .GetConstructor() methods are removed
21+
[main] Obsolete TypeHelper.GetConstructor() and .GetInterfaces() are removed
22+
[main] Obsolete SqlCompilerConfiguration.SchemaMapping and .DatabaseMapping properties and constructor are removed
23+
[main] Obsolete SqlNodeActualizer class is removed
24+
[main] Obsolete SqlCompilerContext.SqlNodeActualizer property is removed
25+
[main] Obsolete XtensiveSql.Dml.Extensions.IsNullReference() extension method is removed
1326
[postgresql] QueryInfo.MaxQueryParameterCount actualized, it is 65535 now
1427
[oracle] QueryInfo.MaxQueryParameterCount actualized, it is 65535 now

Orm/Xtensive.Orm/Core/Extensions/LockableExtensions.cs

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

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,12 +81,6 @@ public class DomainConfiguration : ConfigurationBase
8181
/// </summary>
8282
public const bool DefaultEnsureConnectionIsAlive = true;
8383

84-
/// <summary>
85-
/// Default <see cref="EntityVersioningPolicy"/> value;
86-
/// </summary>
87-
[Obsolete("Use VersioningConvention.DefaultVersioningPolicy")]
88-
public const EntityVersioningPolicy DefaultVersioningPolicy = EntityVersioningPolicy.Default;
89-
9084
/// <summary>
9185
/// Default <see cref="UpgradeMode"/> value.
9286
/// </summary>

Orm/Xtensive.Orm/Orm/Model/TypeInfo.cs

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -566,43 +566,6 @@ public Tuple InjectPrimaryKey(Tuple entityTuple, Tuple primaryKey)
566566
return primaryKeyInjector.Apply(TupleTransformType.Tuple, primaryKey, entityTuple);
567567
}
568568

569-
/// <summary>
570-
/// Gets the direct implementors of this instance.
571-
/// </summary>
572-
/// <param name="recursive">if set to <see langword="true"/> then both direct and non-direct implementors will be returned.</param>
573-
[Obsolete("Use DirectImplementors/AllImplementors properties instead")]
574-
public IEnumerable<TypeInfo> GetImplementors(bool recursive = false) => recursive ? AllImplementors : DirectImplementors;
575-
576-
/// <summary>
577-
/// Gets the persistent interfaces this instance implements.
578-
/// </summary>
579-
/// <param name="recursive">if set to <see langword="true"/> then both direct and non-direct implemented interfaces will be returned.</param>
580-
[Obsolete("Use DirectInterfaces/AllInterfaces properties instead")]
581-
public IEnumerable<TypeInfo> GetInterfaces(bool recursive = false) => recursive ? AllInterfaces : DirectInterfaces;
582-
583-
/// <summary>
584-
/// Gets descendants of this instance.
585-
/// </summary>
586-
/// <param name="recursive">if set to <see langword="true"/> then both direct and nested descendants will be returned.</param>
587-
/// <returns></returns>
588-
[Obsolete("Use DirectDescendants/AllDescendants properties instead")]
589-
public IEnumerable<TypeInfo> GetDescendants(bool recursive) => recursive ? AllDescendants : DirectDescendants;
590-
591-
/// <summary>
592-
/// Gets the ancestors recursively. Root-to-inheritor order.
593-
/// </summary>
594-
/// <returns>The ancestor</returns>
595-
[Obsolete("Use Ancestors property instead")]
596-
public IReadOnlyList<TypeInfo> GetAncestors() => Ancestors.ToList();
597-
598-
/// <summary>
599-
/// Gets the root of the hierarchy.
600-
/// </summary>
601-
/// <returns>The hierarchy root.</returns>
602-
[Obsolete("Use Root property instead")]
603-
[CanBeNull]
604-
public TypeInfo GetRoot() => Root;
605-
606569
public IEnumerable<AssociationInfo> GetTargetAssociations()
607570
{
608571
if (targetAssociations == null) {

Orm/Xtensive.Orm/Orm/Model/TypeInfoCollection.cs

Lines changed: 0 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -167,90 +167,6 @@ public TypeInfo Find(string fullName)
167167
return fullNameTable.TryGetValue(fullName, out result) ? result : null;
168168
}
169169

170-
171-
/// <summary>
172-
/// Finds the ancestor of the specified <paramref name="item"/>.
173-
/// </summary>
174-
/// <param name="item">The type to search ancestor for.</param>
175-
/// <returns><see cref="TypeInfo"/> instance that is ancestor of specified <paramref name="item"/> or
176-
/// <see langword="null"/> if the ancestor is not found in this collection.</returns>
177-
/// <exception cref="ArgumentNullException">When <paramref name="item"/> is <see langword="null"/>.</exception>
178-
[Obsolete("Use TypeInfo.Ancestor")]
179-
public TypeInfo FindAncestor(TypeInfo item) => item.Ancestor;
180-
181-
/// <summary>
182-
/// Finds the set of direct descendants of the specified <paramref name="item"/>.
183-
/// </summary>
184-
/// <param name="item">The type to search descendants for.</param>
185-
/// <returns><see cref="IEnumerable{T}"/> of <see cref="TypeInfo"/> instance that are descendants of specified <paramref name="item"/>.</returns>
186-
/// <exception cref="ArgumentNullException">When <paramref name="item"/> is <see langword="null"/>.</exception>
187-
[Obsolete("Use TypeInfo.DirectDescendants")]
188-
public IEnumerable<TypeInfo> FindDescendants(TypeInfo item) => item.DirectDescendants;
189-
190-
/// <summary>
191-
/// Finds the set of descendants of the specified <paramref name="item"/>.
192-
/// </summary>
193-
/// <param name="item">The type to search descendants for.</param>
194-
/// <param name="recursive">if set to <see langword="true"/> then both direct and nested descendants will be returned.</param>
195-
/// <returns>
196-
/// <see cref="IEnumerable{T}"/> of <see cref="TypeInfo"/> instance that are descendants of specified <paramref name="item"/>.
197-
/// </returns>
198-
/// <exception cref="ArgumentNullException">When <paramref name="item"/> is <see langword="null"/>.</exception>
199-
[Obsolete("Use TypeInfo.DirectDescendants/.AllDescendants")]
200-
public IEnumerable<TypeInfo> FindDescendants(TypeInfo item, bool recursive) =>
201-
recursive ? item.AllDescendants : item.DirectDescendants;
202-
203-
/// <summary>
204-
/// Find the <see cref="IList{T}"/> of interfaces that specified <paramref name="item"/> implements.
205-
/// </summary>
206-
/// <param name="item">The type to search interfaces for.</param>
207-
/// <returns><see cref="IEnumerable{T}"/> of <see cref="TypeInfo"/> instance that are implemented by specified <paramref name="item"/>.</returns>
208-
/// <exception cref="ArgumentNullException">When <paramref name="item"/> is <see langword="null"/>.</exception>
209-
[Obsolete("Use TypeInfo.DirectInterfaces")]
210-
public IEnumerable<TypeInfo> FindInterfaces(TypeInfo item) => item.DirectInterfaces;
211-
212-
/// <summary>
213-
/// Find the <see cref="IList{T}"/> of interfaces that specified <paramref name="item"/> implements.
214-
/// </summary>
215-
/// <param name="item">The type to search interfaces for.</param>
216-
/// <param name="recursive">if set to <see langword="true"/> then both direct and non-direct implemented interfaces will be returned.</param>
217-
/// <returns><see cref="IEnumerable{T}"/> of <see cref="TypeInfo"/> instance that are implemented by specified <paramref name="item"/>.</returns>
218-
/// <exception cref="ArgumentNullException">When <paramref name="item"/> is <see langword="null"/>.</exception>
219-
[Obsolete("Use TypeInfo.DirectInterfaces/.AllInterfaces ")]
220-
public IEnumerable<TypeInfo> FindInterfaces(TypeInfo item, bool recursive) =>
221-
recursive ? item.AllInterfaces : item.DirectInterfaces;
222-
223-
/// <summary>
224-
/// Finds the set of direct implementors of the specified <paramref name="item"/>.
225-
/// </summary>
226-
/// <param name="item">The type to search implementors for.</param>
227-
/// <returns><see cref="IEnumerable{T}"/> of <see cref="TypeInfo"/> instance that are implementors of specified <paramref name="item"/>.</returns>
228-
/// <exception cref="ArgumentNullException">When <paramref name="item"/> is <see langword="null"/>.</exception>
229-
[Obsolete("Use TypeInfo.DirectImplementors")]
230-
public IEnumerable<TypeInfo> FindImplementors(TypeInfo item) => item.DirectImplementors;
231-
232-
/// <summary>
233-
/// Finds the set of implementors of the specified <paramref name="item"/>.
234-
/// </summary>
235-
/// <param name="item">The type to search implementors for.</param>
236-
/// <param name="recursive">if set to <see langword="true"/> then both direct and nested implementors will be returned.</param>
237-
/// <returns>
238-
/// <see cref="IEnumerable{T}"/> of <see cref="TypeInfo"/> instance that are implementors of specified <paramref name="item"/>.
239-
/// </returns>
240-
/// <exception cref="ArgumentNullException">When <paramref name="item"/> is <see langword="null"/>.</exception>
241-
[Obsolete("Use TypeInfo.DirectImplementors/.AllImplementors ")]
242-
public IEnumerable<TypeInfo> FindImplementors(TypeInfo item, bool recursive) =>
243-
recursive ? item.AllImplementors : item.DirectImplementors;
244-
245-
/// <summary>
246-
/// Finds the root of the specified <paramref name="item"/>.
247-
/// </summary>
248-
/// <param name="item">The type to search root for.</param>
249-
/// <returns><see cref="TypeInfo"/> instance that is root of specified <paramref name="item"/>.</returns>
250-
/// <exception cref="ArgumentNullException">When <paramref name="item"/> is <see langword="null"/>.</exception>
251-
[Obsolete("Use TypeInfo.Root")]
252-
public TypeInfo FindRoot(TypeInfo item) => item.Root;
253-
254170
/// <summary>
255171
/// Finds the ancestor of the specified <paramref name="type"/>.
256172
/// </summary>

Orm/Xtensive.Orm/Orm/Providers/Requests/PersistRequest.cs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -56,21 +56,5 @@ public PersistRequest(
5656
CompileUnit = compileUnit;
5757
ParameterBindings = ParameterBinding.NormalizeBindings(parameterBindings);
5858
}
59-
60-
[Obsolete]
61-
public PersistRequest(
62-
StorageDriver driver, SqlStatement statement, IEnumerable<PersistParameterBinding> parameterBindings, NodeConfiguration nodeConfiguration)
63-
{
64-
ArgumentValidator.EnsureArgumentNotNull(driver, "driver");
65-
ArgumentValidator.EnsureArgumentNotNull(statement, "statement");
66-
67-
var compileUnit = statement as ISqlCompileUnit
68-
?? throw new ArgumentException("Statement is not ISqlCompileUnit");
69-
70-
this.driver = driver;
71-
Statement = statement;
72-
CompileUnit = compileUnit;
73-
ParameterBindings = ParameterBinding.NormalizeBindings(parameterBindings);
74-
}
7559
}
7660
}

Orm/Xtensive.Orm/Orm/Providers/Requests/PersistRequestBuilder.cs

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -192,14 +192,6 @@ private SqlExpression BuildVersionFilter(PersistRequestBuilderContext context, S
192192
return result;
193193
}
194194

195-
[Obsolete("Use constructor directly")]
196-
protected PersistRequest CreatePersistRequest(SqlStatement query, IEnumerable<PersistParameterBinding> bindings, NodeConfiguration nodeConfiguration)
197-
{
198-
return Handlers.Domain.Configuration.ShareStorageSchemaOverNodes
199-
? new PersistRequest(driver, query, bindings, nodeConfiguration)
200-
: new PersistRequest(driver, query, bindings);
201-
}
202-
203195
private bool AddFakeVersionColumnUpdate(PersistRequestBuilderContext context, SqlUpdate update, SqlTableRef filteredTable)
204196
{
205197
foreach (var column in context.Type.GetVersionColumns()) {

Orm/Xtensive.Orm/Orm/Providers/StorageDriver.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -88,16 +88,6 @@ public SqlCompilationResult Compile(ISqlCompileUnit statement)
8888
return underlyingDriver.Compile(statement, options);
8989
}
9090

91-
[Obsolete]
92-
public SqlCompilationResult Compile(ISqlCompileUnit statement, NodeConfiguration nodeConfiguration)
93-
{
94-
var options = new SqlCompilerConfiguration {
95-
DatabaseQualifiedObjects = configuration.IsMultidatabase,
96-
CommentLocation = configuration.TagsLocation.ToCommentLocation()
97-
};
98-
return underlyingDriver.Compile(statement, options);
99-
}
100-
10191
public DbDataReaderAccessor GetDataReaderAccessor(in TupleDescriptor descriptor)
10292
{
10393
return new DbDataReaderAccessor(descriptor, descriptor.Select(GetTypeMapping));

Orm/Xtensive.Orm/Reflection/MethodHelper.cs

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -93,23 +93,6 @@ public static MethodInfo GetMethodEx(this Type type, string name, BindingFlags b
9393
return lastMatch;
9494
}
9595

96-
/// <summary>
97-
/// Gets generic method by names \ types of its arguments.
98-
/// </summary>
99-
/// <param name="type">Type to search the method in.</param>
100-
/// <param name="name">Method name.</param>
101-
/// <param name="bindingFlags">Binding attributes.</param>
102-
/// <param name="genericArgumentNames">Generic arguments of the method.</param>
103-
/// <param name="parameterTypes">Either strings or <see cref="Type"/>s of parameters (mixing is allowed).</param>
104-
/// <returns>Found method, if match was found;
105-
/// otherwise, <see langword="null"/>.</returns>
106-
[DebuggerStepThrough]
107-
[Obsolete("Use MethodHelper.GetMethodEx() instead")]
108-
[CanBeNull]
109-
public static MethodInfo GetMethod(this Type type,
110-
string name, BindingFlags bindingFlags, string[] genericArgumentNames, object[] parameterTypes) =>
111-
GetMethodEx(type, name, bindingFlags, genericArgumentNames, parameterTypes);
112-
11396
/// <summary>
11497
/// Gets constructor by names \ types of its parameters.
11598
/// </summary>
@@ -147,11 +130,6 @@ public static ConstructorInfo GetConstructorEx(this Type type, BindingFlags bind
147130
return lastMatch;
148131
}
149132

150-
[Obsolete("Use MethodHelper.GetConstructorEx() instead")]
151-
[CanBeNull]
152-
public static ConstructorInfo GetConstructor(this Type type, BindingFlags bindingFlags, object[] parameterTypes) =>
153-
GetConstructorEx(type, bindingFlags, parameterTypes);
154-
155133
/// <summary>
156134
/// Gets the types of method parameters.
157135
/// </summary>

Orm/Xtensive.Orm/Reflection/TypeHelper.cs

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -630,20 +630,6 @@ public static object Activate(this Type type, Type[] genericArguments, params ob
630630
}
631631
}
632632

633-
/// <summary>
634-
/// Gets the public constructor of type <paramref name="type"/>
635-
/// accepting specified <paramref name="arguments"/>.
636-
/// </summary>
637-
/// <param name="type">The type to get the constructor for.</param>
638-
/// <param name="arguments">The arguments.</param>
639-
/// <returns>
640-
/// Appropriate constructor, if a single match is found;
641-
/// otherwise, <see langword="null"/>.
642-
/// </returns>
643-
[Obsolete, CanBeNull]
644-
public static ConstructorInfo GetConstructor(this Type type, object[] arguments) =>
645-
GetSingleConstructorOrDefault(type, arguments.Select(a => a?.GetType()).ToArray());
646-
647633
/// <summary>
648634
/// Gets the public constructor of type <paramref name="type"/>
649635
/// accepting specified <paramref name="argumentTypes"/>.
@@ -725,15 +711,6 @@ public static InterfaceMapping GetInterfaceMapFast(this Type type, Type targetIn
725711
public static IReadOnlyList<Type> GetInterfacesUnordered(Type type) =>
726712
UnorderedInterfaces.GetOrAdd(type, static t => t.GetInterfaces());
727713

728-
/// <summary>
729-
/// Gets the interfaces of the specified type.
730-
/// Interfaces will be ordered from the very base ones to ancestors.
731-
/// </summary>
732-
/// <param name="type">The type to get the interfaces of.</param>
733-
[Obsolete("Use GetInterfacesOrderByInheritance instead")]
734-
public static Type[] GetInterfaces(this Type type) =>
735-
OrderedInterfaces.GetOrAdd(type, t => t.GetInterfaces().OrderByInheritance().ToArray());
736-
737714
/// <summary>
738715
/// Gets the interfaces of the specified type.
739716
/// Interfaces will be ordered from the very base ones to ancestors.

0 commit comments

Comments
 (0)