Skip to content

Commit 8a25ce3

Browse files
committed
- fix lint issues
1 parent fb2bae8 commit 8a25ce3

File tree

10 files changed

+21
-27
lines changed

10 files changed

+21
-27
lines changed

src/TurboMapper/IMapper.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
using System;
21
using System.Collections.Generic;
32

43
namespace TurboMapper

src/TurboMapper/IMappingExpression.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,11 @@ namespace TurboMapper
66
public interface IMappingExpression<TSource, TTarget>
77
{
88
IMappingExpression<TSource, TTarget> ForMember<TValue>(Expression<Func<TTarget, TValue>> targetMember, Expression<Func<TSource, TValue>> sourceMember);
9+
910
IMappingExpression<TSource, TTarget> Ignore<TValue>(Expression<Func<TTarget, TValue>> targetMember);
11+
1012
IMappingExpression<TSource, TTarget> When<TValue>(Expression<Func<TTarget, TValue>> targetMember, Func<TSource, bool> condition);
13+
1114
IMappingExpression<TSource, TTarget> MapWith<TSourceValue, TTargetValue>(Expression<Func<TTarget, TTargetValue>> targetMember, Func<TSourceValue, TTargetValue> transformFunction);
1215
}
1316
}

src/TurboMapper/IObjectMap.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ internal interface IObjectMap
88
void CreateMap<TSource, TTarget>(List<PropertyMapping> mappings = null);
99

1010
void CreateMap<TSource, TTarget>(List<PropertyMapping> mappings, bool enableDefaultMapping);
11-
11+
1212
void RegisterConverter<TSource, TDestination>(Func<TSource, TDestination> converter);
1313
}
1414
}

src/TurboMapper/MappingExpression.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public IMappingExpression<TSource, TTarget> Ignore<TValue>(Expression<Func<TTarg
7171

7272
return this;
7373
}
74-
74+
7575
public IMappingExpression<TSource, TTarget> When<TValue>(Expression<Func<TTarget, TValue>> targetMember, Func<TSource, bool> condition)
7676
{
7777
var targetPath = GetMemberPathForTarget(targetMember);
@@ -87,7 +87,7 @@ public IMappingExpression<TSource, TTarget> When<TValue>(Expression<Func<TTarget
8787

8888
return this;
8989
}
90-
90+
9191
public IMappingExpression<TSource, TTarget> MapWith<TSourceValue, TTargetValue>(Expression<Func<TTarget, TTargetValue>> targetMember, Func<TSourceValue, TTargetValue> transformFunction)
9292
{
9393
var targetPath = GetMemberPathForTarget(targetMember);
@@ -96,7 +96,7 @@ public IMappingExpression<TSource, TTarget> MapWith<TSourceValue, TTargetValue>(
9696
// For MapWith, we'll create a property mapping where the source property has the same name
9797
// as the target property, but we'll apply the transformation function
9898
var sourcePath = targetPath; // Assuming same property name for simplicity
99-
99+
100100
// Add a transformation property mapping
101101
Mappings.Add(new PropertyMapping
102102
{

src/TurboMapper/MappingModule.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,14 @@ private void RegisterConverters(IObjectMap mapper)
8282
{
8383
var sourceType = converter.Method.GetParameters()[0].ParameterType;
8484
var destType = converter.Method.ReturnType;
85-
85+
8686
// Find and invoke the RegisterConverter method with proper type parameters
87-
var method = mapper.GetType().GetMethod("RegisterConverter",
87+
var method = mapper.GetType().GetMethod("RegisterConverter",
8888
System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.Instance,
89-
null,
90-
new Type[] { converter.GetType() },
89+
null,
90+
new Type[] { converter.GetType() },
9191
null);
92-
92+
9393
if (method == null)
9494
{
9595
// Try to get the generic method and make it specific

src/TurboMapper/ValidationResult.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,12 @@ public class ValidationResult
66
{
77
public bool IsValid { get; set; }
88
public IEnumerable<string> Errors { get; set; }
9-
9+
1010
public ValidationResult()
1111
{
1212
Errors = new List<string>();
1313
}
14-
14+
1515
public ValidationResult(bool isValid, IEnumerable<string> errors)
1616
{
1717
IsValid = isValid;

tests/TurboMapper.Tests/IntegrationTests.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
using Microsoft.Extensions.DependencyInjection;
2-
using System;
3-
using System.Collections.Generic;
42

53
namespace TurboMapper.Tests
64
{

tests/TurboMapper.Tests/MapperAdvancedTests.cs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
using System;
2-
using System.Collections.Generic;
31
using TurboMapper.Impl;
42

53
namespace TurboMapper.Tests

tests/TurboMapper.Tests/Release120_Tests.cs

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -144,17 +144,17 @@ public void Task5_1_CustomTypeConvertersRegistration()
144144
// Create a mapping from string to int using converter registered in module
145145
var converterModule = new StringToIntConverterModule();
146146
var mapper = new Mapper();
147-
147+
148148
// Register the module which will register the string to int converter
149149
((IMappingModule)converterModule).CreateMap(mapper);
150-
150+
151151
// Test that a string value can be converted to int through the registered converter
152152
var source = new StringValueClass { Number = "42" };
153153
var result = mapper.Map<StringValueClass, IntValueClass>(source);
154-
154+
155155
Assert.AreEqual(42, result.Number);
156156
}
157-
157+
158158
// Test module for converter registration
159159
public class StringToIntConverterModule : MappingModule<StringValueClass, IntValueClass>
160160
{
@@ -163,18 +163,18 @@ public class StringToIntConverterModule : MappingModule<StringValueClass, IntVal
163163
// Register converter within the module
164164
RegisterConverter<string, int>(s => int.Parse(s));
165165
}
166-
166+
167167
public override Action<IMappingExpression<StringValueClass, IntValueClass>> CreateMappings()
168168
{
169169
return expression => { };
170170
}
171171
}
172-
172+
173173
public class StringValueClass
174174
{
175175
public string Number { get; set; }
176176
}
177-
177+
178178
public class IntValueClass
179179
{
180180
public int Number { get; set; }

tests/TurboMapper.Tests/ServiceCollectionExtensionTests.cs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
using System;
2-
using System.Linq;
31
using Microsoft.Extensions.DependencyInjection;
4-
using TurboMapper;
5-
using TurboMapper.Tests;
62

73
namespace TurboMapper.Tests
84
{

0 commit comments

Comments
 (0)