Browse files

General code cleanup

I removed unused directives and a couple of redundant items (commas,
semi-colon, etc.).
  • Loading branch information...
1 parent e1b4d8f commit c00db4c3bea248914120b71ca25f0730767e749f @engstrom engstrom committed with jbogard Sep 2, 2013
View
1 src/AutoMapper/AutoMapperMappingException.cs
@@ -1,7 +1,6 @@
using System;
using System.Collections.Generic;
using System.Linq;
-using System.Runtime.Serialization;
using System.Text;
namespace AutoMapper
View
24 src/AutoMapper/IFormatterConfiguration.cs
@@ -4,34 +4,34 @@ namespace AutoMapper
using System.Collections.Generic;
[Obsolete("Formatters should not be used")]
- public interface IFormatterConfiguration : IProfileConfiguration
- {
+ public interface IFormatterConfiguration : IProfileConfiguration
+ {
[Obsolete("Formatters should not be used")]
- IValueFormatter[] GetFormatters();
+ IValueFormatter[] GetFormatters();
[Obsolete("Formatters should not be used")]
IDictionary<Type, IFormatterConfiguration> GetTypeSpecificFormatters();
[Obsolete("Formatters should not be used")]
- Type[] GetFormatterTypesToSkip();
+ Type[] GetFormatterTypesToSkip();
[Obsolete("Formatters should not be used")]
- IEnumerable<IValueFormatter> GetFormattersToApply(ResolutionContext context);
- }
+ IEnumerable<IValueFormatter> GetFormattersToApply(ResolutionContext context);
+ }
/// <summary>
/// Contains profile-specific configuration
/// </summary>
- public interface IProfileConfiguration
- {
+ public interface IProfileConfiguration
+ {
/// <summary>
/// Indicates that null source values should be mapped as null
/// </summary>
- bool MapNullSourceValuesAsNull { get; }
+ bool MapNullSourceValuesAsNull { get; }
/// <summary>
/// Indicates that null source collections should be mapped as null
/// </summary>
- bool MapNullSourceCollectionsAsNull { get; }
- }
-}
+ bool MapNullSourceCollectionsAsNull { get; }
+ }
+}
View
2 src/AutoMapper/IMappingEngineRunner.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace AutoMapper
{
/// <summary>
View
2 src/AutoMapper/IValueResolver.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace AutoMapper
{
/// <summary>
View
2 src/AutoMapper/Internal/ConcurrentDictionaryFactory.cs
@@ -1,7 +1,5 @@
using System;
-using System.Collections;
using System.Collections.Concurrent;
-using System.Collections.Generic;
namespace AutoMapper.Internal
{
View
1 src/AutoMapper/Internal/MethodGetter.cs
@@ -1,6 +1,5 @@
using System;
using System.Reflection;
-using AutoMapper;
namespace AutoMapper.Impl
{
View
1 src/AutoMapper/Internal/NotSupportedEnumNameValueMappingFactory.cs
@@ -1,5 +1,4 @@
using System;
-using System.Linq;
namespace AutoMapper.Internal
{
View
2 src/AutoMapper/Internal/NullReplacementMethod.cs
@@ -1,5 +1,3 @@
-using System;
-
namespace AutoMapper
{
public class NullReplacementMethod : IValueResolver
View
1 src/AutoMapper/Internal/PropertyGetter.cs
@@ -1,6 +1,5 @@
using System;
using System.Reflection;
-using AutoMapper;
namespace AutoMapper.Impl
{
View
1 src/AutoMapper/Internal/ProxyGenerator.cs
@@ -2,7 +2,6 @@
using System.Collections.Generic;
using System.ComponentModel;
using System.Diagnostics;
-using System.IO;
using System.Linq;
using System.Reflection;
using System.Reflection.Emit;
View
1 src/AutoMapper/Mappers/EnumerableMapper.cs
@@ -2,7 +2,6 @@
using System.Collections;
using System.Collections.Generic;
using System.Linq;
-using System.Reflection;
using AutoMapper.Internal;
namespace AutoMapper.Mappers
View
1 src/AutoMapper/Mappers/HashSetMapper.cs
@@ -1,5 +1,4 @@
using System.Linq;
-using System.Reflection;
using AutoMapper.Internal;
namespace AutoMapper.Mappers
View
2 src/AutoMapper/Mappers/MapperRegistry.cs
@@ -25,7 +25,7 @@ public class MapperRegistry : IMapperRegistry
new NullableSourceMapper(),
new NullableMapper(),
new ImplicitConversionOperatorMapper(),
- new ExplicitConversionOperatorMapper(),
+ new ExplicitConversionOperatorMapper()
};
public IEnumerable<IObjectMapper> GetMappers()
View
2 src/AutoMapper/Mappers/MapperRegistryOverride.cs
@@ -36,7 +36,7 @@ public class MapperRegistryOverride : IMapperRegistry
new NullableSourceMapper(),
new NullableMapper(),
new ImplicitConversionOperatorMapper(),
- new ExplicitConversionOperatorMapper(),
+ new ExplicitConversionOperatorMapper()
};
public IEnumerable<IObjectMapper> GetMappers()
View
2 src/AutoMapper/Mappers/TypeMapObjectMapperRegistry.cs
@@ -114,7 +114,7 @@ private void MapPropertyValue(ResolutionContext context, IMappingEngineRunner ma
if (result.ShouldIgnore)
return;
- object destinationValue = propertyMap.GetDestinationValue(mappedObject);;
+ object destinationValue = propertyMap.GetDestinationValue(mappedObject);
var sourceType = result.Type;
var destinationType = propertyMap.DestinationProperty.MemberType;
View
2 src/AutoMapper/QueryableExtensions.cs
@@ -1,9 +1,7 @@
using System;
-using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
-using System.Reflection;
using AutoMapper.Impl;
using AutoMapper.Internal;
View
3 src/AutoMapper/SourceMemberConfig.cs
@@ -1,5 +1,4 @@
-using System;
-using System.Reflection;
+using System.Reflection;
namespace AutoMapper
{
View
24 src/AutoMapper/TypeMap.cs
@@ -18,7 +18,7 @@ public class TypeMap
private readonly IList<Action<object, object>> _beforeMapActions = new List<Action<object, object>>();
private readonly TypeInfo _destinationType;
private readonly ISet<TypePair> _includedDerivedTypes = SetFactory.CreateSet<TypePair>();
- private readonly ThreadSafeList<PropertyMap> _propertyMaps = new ThreadSafeList<PropertyMap>();
+ private readonly ThreadSafeList<PropertyMap> _propertyMaps = new ThreadSafeList<PropertyMap>();
private readonly ThreadSafeList<SourceMemberConfig> _sourceMemberConfigs =
new ThreadSafeList<SourceMemberConfig>();
@@ -61,10 +61,10 @@ public Type DestinationType
get
{
return (src, dest) =>
- {
- foreach (var action in _beforeMapActions)
- action(src, dest);
- };
+ {
+ foreach (var action in _beforeMapActions)
+ action(src, dest);
+ };
}
}
@@ -73,10 +73,10 @@ public Type DestinationType
get
{
return (src, dest) =>
- {
- foreach (var action in _afterMapActions)
- action(src, dest);
- };
+ {
+ foreach (var action in _afterMapActions)
+ action(src, dest);
+ };
}
}
@@ -219,8 +219,8 @@ public void Seal()
_orderedPropertyMaps =
_propertyMaps
- .Union(_inheritedMaps)
- .OrderBy(map => map.GetMappingOrder()).ToArray();
+ .Union(_inheritedMaps)
+ .OrderBy(map => map.GetMappingOrder()).ToArray();
_orderedPropertyMaps.Each(pm => pm.Seal());
@@ -299,4 +299,4 @@ public SourceMemberConfig FindOrCreateSourceMemberConfigFor(MemberInfo sourceMem
return config;
}
}
-}
+}
View
1 src/AutoMapperSamples/Configuration/Profiles.cs
@@ -1,4 +1,3 @@
-using System;
using AutoMapper;
using NUnit.Framework;
using Should;
View
1 src/AutoMapperSamples/ConfigurationValidation.cs
@@ -1,4 +1,3 @@
-using System;
using AutoMapper;
using NUnit.Framework;
View
2 src/AutoMapperSamples/Mappers/Dictionaries.cs
@@ -35,7 +35,7 @@ public void Example()
{"Third", new SourceValue {Value = 15}}
};
- var destDict = Mapper.Map<Dictionary<string, SourceValue>, System.Collections.Generic.IDictionary<string, DestValue>>(sourceDict);
+ var destDict = Mapper.Map<Dictionary<string, SourceValue>, IDictionary<string, DestValue>>(sourceDict);
destDict.Count.ShouldEqual(3);
destDict["First"].Value.ShouldEqual(5);
View
1 src/AutoMapperSamples/Mappers/Strings.cs
@@ -1,4 +1,3 @@
-using System;
using AutoMapper;
using Should;
using NUnit.Framework;

0 comments on commit c00db4c

Please sign in to comment.