Skip to content

Commit

Permalink
address feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
Wraith2 committed Jun 9, 2021
1 parent b9b5eec commit c056361
Showing 1 changed file with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,7 @@ internal FieldInfoEx(FieldInfo fi, int offset, Normalizer normalizer)
internal Normalizer Normalizer { get; private set; }

// Sort fields by field offsets.
public int CompareTo(object other)
{
if (other is FieldInfoEx otherFieldInfoEx)
{
return _offset.CompareTo(otherFieldInfoEx._offset);
}
return -1;
}
public int CompareTo(object other) => other is FieldInfoEx otherEx ? _offset.CompareTo(otherEx._offset) : -1;
}

// The most complex normalizer, a udt normalizer
Expand Down Expand Up @@ -73,7 +66,7 @@ internal BinaryOrderedUdtNormalizer(Type t, bool isTopLevelUdt)
// what to do about nested udts
_isTopLevelUdt = true;
// else
// this.m_isTopLevelUdt = isTopLevelUdt;
// this._isTopLevelUdt = isTopLevelUdt;

FieldInfo[] fields = GetFields(t);

Expand Down Expand Up @@ -136,7 +129,7 @@ private object DeNormalizeInternal(Type t, Stream s)
{
object result = null;
//if nullable and not the top object, read the null marker
if (!_isTopLevelUdt && typeof(System.Data.SqlTypes.INullable).IsAssignableFrom(t))
if (!_isTopLevelUdt && typeof(INullable).IsAssignableFrom(t))
{
byte nullByte = (byte)s.ReadByte();
if (nullByte == 0)
Expand Down

0 comments on commit c056361

Please sign in to comment.