Small improvements
This commit is contained in:
@@ -6002,33 +6002,6 @@ namespace DynamORM
|
||||
: base(string.Format("{0}{1}{2}", message, Environment.NewLine, command != null ? command.DumpToString() : string.Empty), innerException)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the
|
||||
/// <see cref="DynamicQueryException"/> class.</summary>
|
||||
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" />
|
||||
/// that holds the serialized object data about the exception being thrown.</param>
|
||||
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" />
|
||||
/// that contains contextual information about the source or destination.</param>
|
||||
public DynamicQueryException(SerializationInfo info, StreamingContext context)
|
||||
: base(info, context)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>When overridden in a derived class, sets the
|
||||
/// <see cref="T:System.Runtime.Serialization.SerializationInfo" />
|
||||
/// with information about the exception.</summary>
|
||||
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo" />
|
||||
/// that holds the serialized object data about the exception being thrown.</param>
|
||||
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext" />
|
||||
/// that contains contextual information about the source or destination.</param>
|
||||
/// <PermissionSet>
|
||||
/// <IPermission class="System.Security.Permissions.FileIOPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Read="*AllFiles*" PathDiscovery="*AllFiles*" />
|
||||
/// <IPermission class="System.Security.Permissions.SecurityPermission, mscorlib, Version=2.0.3600.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" version="1" Flags="SerializationFormatter" />
|
||||
/// </PermissionSet>
|
||||
public override void GetObjectData(SerializationInfo info, StreamingContext context)
|
||||
{
|
||||
base.GetObjectData(info, context);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Stores information about column from database schema.</summary>
|
||||
@@ -13327,7 +13300,7 @@ namespace DynamORM
|
||||
catch (TargetInvocationException e)
|
||||
{
|
||||
if (e.InnerException != null) throw e.InnerException;
|
||||
else throw e;
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14014,13 +13987,6 @@ namespace DynamORM
|
||||
public DynamicMapperException(string message, Exception innerException) : base(message, innerException)
|
||||
{
|
||||
}
|
||||
|
||||
/// <summary>Initializes a new instance of the <see cref="DynamicMapperException"/> class.</summary>
|
||||
/// <param name="info">The <see cref="T:System.Runtime.Serialization.SerializationInfo"/> that holds the serialized object data about the exception being thrown.</param>
|
||||
/// <param name="context">The <see cref="T:System.Runtime.Serialization.StreamingContext"/> that contains contextual information about the source or destination.</param>
|
||||
protected DynamicMapperException(SerializationInfo info, StreamingContext context) : base(info, context)
|
||||
{
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>Dynamic property invoker.</summary>
|
||||
@@ -14110,10 +14076,10 @@ namespace DynamORM
|
||||
|
||||
private Func<object, object> CreateGetter(PropertyInfo property)
|
||||
{
|
||||
if (!property.CanRead)
|
||||
if (property == null || !property.CanRead)
|
||||
return null;
|
||||
|
||||
ParameterExpression objParm = Expression.Parameter(typeof(object), "o");
|
||||
var objParm = Expression.Parameter(typeof(object), "o");
|
||||
|
||||
return Expression.Lambda<Func<object, object>>(
|
||||
Expression.Convert(
|
||||
@@ -14128,8 +14094,8 @@ namespace DynamORM
|
||||
if (!property.CanWrite)
|
||||
return null;
|
||||
|
||||
ParameterExpression objParm = Expression.Parameter(typeof(object), "o");
|
||||
ParameterExpression valueParm = Expression.Parameter(typeof(object), "value");
|
||||
var objParm = Expression.Parameter(typeof(object), "o");
|
||||
var valueParm = Expression.Parameter(typeof(object), "value");
|
||||
|
||||
return Expression.Lambda<Action<object, object>>(
|
||||
Expression.Assign(
|
||||
|
||||
@@ -123,10 +123,10 @@ namespace DynamORM.Mapper
|
||||
|
||||
private Func<object, object> CreateGetter(PropertyInfo property)
|
||||
{
|
||||
if (!property.CanRead)
|
||||
if (property == null || !property.CanRead)
|
||||
return null;
|
||||
|
||||
ParameterExpression objParm = Expression.Parameter(typeof(object), "o");
|
||||
var objParm = Expression.Parameter(typeof(object), "o");
|
||||
|
||||
return Expression.Lambda<Func<object, object>>(
|
||||
Expression.Convert(
|
||||
@@ -141,8 +141,8 @@ namespace DynamORM.Mapper
|
||||
if (!property.CanWrite)
|
||||
return null;
|
||||
|
||||
ParameterExpression objParm = Expression.Parameter(typeof(object), "o");
|
||||
ParameterExpression valueParm = Expression.Parameter(typeof(object), "value");
|
||||
var objParm = Expression.Parameter(typeof(object), "o");
|
||||
var valueParm = Expression.Parameter(typeof(object), "value");
|
||||
|
||||
return Expression.Lambda<Action<object, object>>(
|
||||
Expression.Assign(
|
||||
|
||||
Reference in New Issue
Block a user