Skip to content

Commit b0ff806

Browse files
committed
Fix doc build
1 parent 2cdf910 commit b0ff806

File tree

6 files changed

+80
-85
lines changed

6 files changed

+80
-85
lines changed

CodeJam.Blocks/Mapping/Map.cs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
#if !LESSTHAN_NET40
2-
using System;
3-
42
using JetBrains.Annotations;
3+
using System;
54

65
namespace CodeJam.Mapping
76
{
@@ -10,7 +9,7 @@ namespace CodeJam.Mapping
109
/// </summary>
1110
/// <example>
1211
/// This example shows how to map one object to another.
13-
/// <code source="Blocks\tests\Mapping\Examples\MapTests.cs" region="Example" lang="C#"/>
12+
/// <code source="CodeJam.Blocks.Tests\Mapping\Examples\MapTests.cs" region="Example" lang="C#"/>
1413
/// </example>
1514
[PublicAPI]
1615
public static class Map
@@ -22,8 +21,8 @@ public static class Map
2221
/// <typeparam name="TTo">Type to map to.</typeparam>
2322
/// <returns>Mapping expression.</returns>
2423
[Pure]
25-
public static Mapper<TFrom,TTo> GetMapper<TFrom,TTo>()
26-
=> new Mapper<TFrom,TTo>(new MapperBuilder<TFrom,TTo>());
24+
public static Mapper<TFrom, TTo> GetMapper<TFrom, TTo>()
25+
=> new Mapper<TFrom, TTo>(new MapperBuilder<TFrom, TTo>());
2726

2827
/// <summary>
2928
/// Returns a mapper to map an object of <i>TFrom</i> type to an object of <i>TTo</i> type.
@@ -33,19 +32,19 @@ public static Mapper<TFrom,TTo> GetMapper<TFrom,TTo>()
3332
/// <param name="setter">MapperBuilder parameter setter.</param>
3433
/// <returns>Mapping expression.</returns>
3534
[Pure]
36-
public static Mapper<TFrom,TTo> GetMapper<TFrom,TTo>(
37-
[NotNull] Func<MapperBuilder<TFrom,TTo>,MapperBuilder<TFrom,TTo>> setter)
35+
public static Mapper<TFrom, TTo> GetMapper<TFrom, TTo>(
36+
[NotNull] Func<MapperBuilder<TFrom, TTo>, MapperBuilder<TFrom, TTo>> setter)
3837
{
3938
Code.NotNull(setter, nameof(setter));
4039
return new Mapper<TFrom, TTo>(setter(new MapperBuilder<TFrom, TTo>()));
4140
}
4241

4342
private static class MapHolder<T>
4443
{
45-
public static readonly Mapper<T,T> Mapper =
46-
GetMapper<T,T>(m => m
47-
.SetProcessCrossReferences(true)
48-
.SetDeepCopy(true));
44+
public static readonly Mapper<T, T> Mapper =
45+
GetMapper<T, T>(m => m
46+
.SetProcessCrossReferences(true)
47+
.SetDeepCopy(true));
4948
}
5049

5150
/// <summary>

CodeJam.Blocks/Mapping/Mapper.cs

Lines changed: 14 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
#if !LESSTHAN_NET40
2+
using JetBrains.Annotations;
23
using System;
34
using System.Collections.Generic;
45
using System.Linq.Expressions;
56

6-
using JetBrains.Annotations;
7-
87
namespace CodeJam.Mapping
98
{
109
/// <summary>
@@ -14,50 +13,50 @@ namespace CodeJam.Mapping
1413
/// <typeparam name="TTo">Type to map to.</typeparam>
1514
/// <example>
1615
/// This example shows how to map one object to another.
17-
/// <code source="Blocks\tests\Mapping\Examples\MapTests.cs" region="Example" lang="C#"/>
16+
/// <code source="CodeJam.Blocks.Tests\Mapping\Examples\MapTests.cs" region="Example" lang="C#"/>
1817
/// </example>
1918
[PublicAPI]
20-
public class Mapper<TFrom,TTo>
19+
public class Mapper<TFrom, TTo>
2120
{
22-
private MapperBuilder<TFrom, TTo> _mapperBuilder;
23-
private Expression<Func<TFrom,TTo,IDictionary<object,object>,TTo>> _mapperExpression;
24-
private Expression<Func<TFrom,TTo>> _mapperExpressionEx;
25-
private Func<TFrom,TTo,IDictionary<object,object>,TTo> _mapper;
26-
private Func<TFrom,TTo> _mapperEx;
21+
private MapperBuilder<TFrom, TTo> _mapperBuilder;
22+
private Expression<Func<TFrom, TTo, IDictionary<object, object>, TTo>> _mapperExpression;
23+
private Expression<Func<TFrom, TTo>> _mapperExpressionEx;
24+
private Func<TFrom, TTo, IDictionary<object, object>, TTo> _mapper;
25+
private Func<TFrom, TTo> _mapperEx;
2726

28-
internal Mapper(MapperBuilder<TFrom,TTo> mapperBuilder) => _mapperBuilder = mapperBuilder;
27+
internal Mapper(MapperBuilder<TFrom, TTo> mapperBuilder) => _mapperBuilder = mapperBuilder;
2928

3029
/// <summary>
3130
/// Returns a mapper expression to map an object of <i>TFrom</i> type to an object of <i>TTo</i> type.
3231
/// Returned expression is compatible to IQueriable.
3332
/// </summary>
3433
/// <returns>Mapping expression.</returns>
3534
[Pure, NotNull]
36-
public Expression<Func<TFrom,TTo>> GetMapperExpressionEx()
35+
public Expression<Func<TFrom, TTo>> GetMapperExpressionEx()
3736
=> _mapperExpressionEx ?? (_mapperExpressionEx = _mapperBuilder.GetMapperExpressionEx());
3837

3938
/// <summary>
4039
/// Returns a mapper expression to map an object of <i>TFrom</i> type to an object of <i>TTo</i> type.
4140
/// </summary>
4241
/// <returns>Mapping expression.</returns>
4342
[Pure, NotNull]
44-
public Expression<Func<TFrom,TTo,IDictionary<object,object>,TTo>> GetMapperExpression()
43+
public Expression<Func<TFrom, TTo, IDictionary<object, object>, TTo>> GetMapperExpression()
4544
=> _mapperExpression ?? (_mapperExpression = _mapperBuilder.GetMapperExpression());
4645

4746
/// <summary>
4847
/// Returns a mapper to map an object of <i>TFrom</i> type to an object of <i>TTo</i> type.
4948
/// </summary>
5049
/// <returns>Mapping expression.</returns>
5150
[Pure, NotNull]
52-
public Func<TFrom,TTo> GetMapperEx()
51+
public Func<TFrom, TTo> GetMapperEx()
5352
=> _mapperEx ?? (_mapperEx = GetMapperExpressionEx().Compile());
5453

5554
/// <summary>
5655
/// Returns a mapper to map an object of <i>TFrom</i> type to an object of <i>TTo</i> type.
5756
/// </summary>
5857
/// <returns>Mapping expression.</returns>
5958
[Pure, NotNull]
60-
public Func<TFrom,TTo,IDictionary<object,object>,TTo> GetMapper()
59+
public Func<TFrom, TTo, IDictionary<object, object>, TTo> GetMapper()
6160
=> _mapper ?? (_mapper = GetMapperExpression().Compile());
6261

6362
/// <summary>
@@ -86,7 +85,7 @@ public TTo Map(TFrom source, TTo destination)
8685
/// <param name="crossReferenceDictionary">Storage for cress references if applied.</param>
8786
/// <returns>Destination object.</returns>
8887
[Pure]
89-
public TTo Map(TFrom source, TTo destination, IDictionary<object,object> crossReferenceDictionary)
88+
public TTo Map(TFrom source, TTo destination, IDictionary<object, object> crossReferenceDictionary)
9089
=> GetMapper()(source, destination, crossReferenceDictionary);
9190
}
9291
}

0 commit comments

Comments
 (0)