Skip to content

Commit 6a738a1

Browse files
committed
cleanup code
1 parent 8e6f7c7 commit 6a738a1

File tree

6 files changed

+7
-26
lines changed

6 files changed

+7
-26
lines changed

src/Migrator.Tests/JoiningTableTransformationProviderExtensionsTests.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
using System.Data;
22
using DotNetProjects.Migrator.Framework;
3+
using DotNetProjects.Migrator.Framework.Support;
34
using NSubstitute;
45
using NUnit.Framework;
56

src/Migrator/AssemblyInfo.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System.Reflection;
1+
using System.Reflection;
22

33
[assembly: AssemblyTitle("DotNetProjects.Migrator")]
44
[assembly: AssemblyDescription("DotNetProjects.Migrator Core")]

src/Migrator/Framework/StringUtils.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,4 +42,4 @@ public static string ReplaceOnce(string template, string placeholder, string rep
4242
.ToString();
4343
}
4444
}
45-
}
45+
}

src/Migrator/MigrateAnywhere.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
using System;
22
using System.Collections.Generic;
33
using System.Reflection;
4-
using DotNetProjects.Migrator.Providers;
54
using DotNetProjects.Migrator.Framework;
5+
using DotNetProjects.Migrator.Providers;
66

77
namespace DotNetProjects.Migrator;
88

@@ -118,4 +118,4 @@ private void RemoveMigration(IMigration migration, MigrationAttribute attr)
118118
migration.AfterDown();
119119
}
120120
}
121-
}
121+
}

src/Migrator/MigrationComparer.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -32,13 +32,8 @@ public MigrationTypeComparer(bool ascending)
3232

3333
public int Compare(Type x, Type y)
3434
{
35-
#if NETSTANDARD
36-
var attribOfX = x.GetTypeInfo().GetCustomAttribute<MigrationAttribute>();
37-
var attribOfY = y.GetTypeInfo().GetCustomAttribute<MigrationAttribute>();
38-
#else
3935
var attribOfX = (MigrationAttribute)Attribute.GetCustomAttribute(x, typeof(MigrationAttribute));
4036
var attribOfY = (MigrationAttribute)Attribute.GetCustomAttribute(y, typeof(MigrationAttribute));
41-
#endif
4237

4338
if (_ascending)
4439
{
@@ -49,4 +44,4 @@ public int Compare(Type x, Type y)
4944
return attribOfY.Version.CompareTo(attribOfX.Version);
5045
}
5146
}
52-
}
47+
}

src/Migrator/ProviderFactory.cs

Lines changed: 1 addition & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,5 @@
1-
#region License
2-
3-
//The contents of this file are subject to the Mozilla Public License
4-
//Version 1.1 (the "License"); you may not use this file except in
5-
//compliance with the License. You may obtain a copy of the License at
6-
//http://www.mozilla.org/MPL/
7-
//Software distributed under the License is distributed on an "AS IS"
8-
//basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See the
9-
//License for the specific language governing rights and limitations
10-
//under the License.
11-
12-
#endregion
13-
141
using System;
15-
using System.Collections.Generic;
162
using System.Data;
17-
using System.Reflection;
183
using DotNetProjects.Migrator.Framework;
194
using DotNetProjects.Migrator.Providers;
205
using DotNetProjects.Migrator.Providers.Impl.DB2;
@@ -99,4 +84,4 @@ public static Dialect DialectForProvider(ProviderTypes providerType)
9984

10085
return null;
10186
}
102-
}
87+
}

0 commit comments

Comments
 (0)