Bleeding out Swan.Tiny

This commit is contained in:
2019-12-10 20:01:19 +01:00
parent b4ae02a85f
commit b2f110b8d6
59 changed files with 254 additions and 200 deletions
+2 -2
View File
@@ -33,7 +33,7 @@ namespace Swan.Mappers {
get;
}
/// <summary>
/*/// <summary>
/// Maps the property.
/// </summary>
/// <typeparam name="TDestinationProperty">The type of the destination property.</typeparam>
@@ -104,6 +104,6 @@ namespace Swan.Mappers {
}
return sourceMembers;
}
}*/
}
}
@@ -1,4 +1,4 @@
using System;
/*using System;
using System.Collections.Generic;
using System.Reflection;
@@ -17,4 +17,4 @@ namespace Swan.Mappers {
public Int32 GetHashCode(PropertyInfo obj) => obj.Name.GetHashCode() + obj.PropertyType.Name.GetHashCode();
}
}
}
}*/
+6 -6
View File
@@ -79,17 +79,17 @@ namespace Swan.Mappers {
/// </code>
/// </example>
public partial class ObjectMapper {
private static readonly Lazy<ObjectMapper> LazyInstance = new Lazy<ObjectMapper>(() => new ObjectMapper());
/*private static readonly Lazy<ObjectMapper> LazyInstance = new Lazy<ObjectMapper>(() => new ObjectMapper());
private readonly List<IObjectMap> _maps = new List<IObjectMap>();
private readonly List<IObjectMap> _maps = new List<IObjectMap>();*/
/// <summary>
/*/// <summary>
/// Gets the current.
/// </summary>
/// <value>
/// The current.
/// </value>
public static ObjectMapper Current => LazyInstance.Value;
public static ObjectMapper Current => LazyInstance.Value;*/
/// <summary>
/// Copies the specified source.
@@ -145,7 +145,7 @@ namespace Swan.Mappers {
return CopyInternal(target, source.ToDictionary(x => x.Key.ToLowerInvariant(), x => Tuple.Create(typeof(Object), x.Value)), propertiesToCopy, ignoreProperties);
}
/// <summary>
/*/// <summary>
/// Creates the map.
/// </summary>
/// <typeparam name="TSource">The type of the source.</typeparam>
@@ -215,7 +215,7 @@ namespace Swan.Mappers {
}
return destination;
}
}*/
private static Int32 CopyInternal(Object target, Dictionary<String, Tuple<Type, Object>> sourceProperties, IEnumerable<String>? propertiesToCopy, IEnumerable<String>? ignoreProperties) {
// Filter properties