System.Data.SQLite
Check-in [5bead76447]
Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:When invoking a data reader callback, pass in the method name that was responsible for invoking it.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | customDataTypes
Files: files | file ages | folders
SHA1: 5bead76447981bdc9af143ba4a11753499fed527
User & Date: mistachkin 2016-06-19 20:28:54
Context
2016-06-19
20:38
Pass the original connection flags into the invoked parameter binding and data reader callbacks. check-in: 044e580886 user: mistachkin tags: customDataTypes
20:28
When invoking a data reader callback, pass in the method name that was responsible for invoking it. check-in: 5bead76447 user: mistachkin tags: customDataTypes
20:17
Correction to the new test suite helper procedures. check-in: fd2ed795c1 user: mistachkin tags: customDataTypes
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to System.Data.SQLite/SQLiteConnection.cs.

356
357
358
359
360
361
362






363
364
365
366
367
368
369
...
376
377
378
379
380
381
382




383
384
385
386
387
388
389
390
391
392

393
394
395
396

397
398
399
400
401
402
403
404











405
406
407
408
409
410
411
  /// <see cref="SQLiteDataReader.GetInt64" />,
  /// <see cref="SQLiteDataReader.GetString" />, and
  /// <see cref="SQLiteDataReader.GetValue" /> methods.
  /// </summary>
  public class SQLiteReadValueEventArgs : EventArgs
  {
      #region Private Data






      /// <summary>
      /// Provides the underlying storage for the
      /// <see cref="ArrayEventArgs" /> property.
      /// </summary>
      private SQLiteReadArrayEventArgs arrayEventArgs;

      /// <summary>
................................................................................
      /////////////////////////////////////////////////////////////////////////

      #region Private Constructors
      /// <summary>
      /// Constructs a new instance of this class.  Depending on the method
      /// being called, one or both of the parameters may be null.
      /// </summary>




      /// <param name="arrayEventArgs">
      /// If the <see cref="SQLiteDataReader.GetBytes" /> or
      /// <see cref="SQLiteDataReader.GetChars" /> method is being called,
      /// this object will contain the parameters for that method.
      /// </param>
      /// <param name="value">
      /// This will be modified by the callback to contain the return value
      /// for the called <see cref="SQLiteDataReader" /> method.
      /// </param>
      internal SQLiteReadValueEventArgs(

          SQLiteReadArrayEventArgs arrayEventArgs,
          SQLiteDataReaderValue value
          )
      {

          this.arrayEventArgs = arrayEventArgs;
          this.value = value;
      }
      #endregion

      /////////////////////////////////////////////////////////////////////////

      #region Public Properties











      /// <summary>
      /// If the <see cref="SQLiteDataReader.GetBytes" /> or
      /// <see cref="SQLiteDataReader.GetChars" /> method is being called,
      /// this object will contain the parameters for that method.
      /// </summary>
      public SQLiteReadArrayEventArgs ArrayEventArgs
      {







>
>
>
>
>
>







 







>
>
>
>










>




>








>
>
>
>
>
>
>
>
>
>
>







356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
...
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
  /// <see cref="SQLiteDataReader.GetInt64" />,
  /// <see cref="SQLiteDataReader.GetString" />, and
  /// <see cref="SQLiteDataReader.GetValue" /> methods.
  /// </summary>
  public class SQLiteReadValueEventArgs : EventArgs
  {
      #region Private Data
      /// <summary>
      /// Provides the underlying storage for the
      /// <see cref="MethodName" /> property.
      /// </summary>
      private string methodName;

      /// <summary>
      /// Provides the underlying storage for the
      /// <see cref="ArrayEventArgs" /> property.
      /// </summary>
      private SQLiteReadArrayEventArgs arrayEventArgs;

      /// <summary>
................................................................................
      /////////////////////////////////////////////////////////////////////////

      #region Private Constructors
      /// <summary>
      /// Constructs a new instance of this class.  Depending on the method
      /// being called, one or both of the parameters may be null.
      /// </summary>
      /// <param name="methodName">
      /// The name of the <see cref="SQLiteDataReader" /> method that was
      /// responsible for invoking this callback.
      /// </param>
      /// <param name="arrayEventArgs">
      /// If the <see cref="SQLiteDataReader.GetBytes" /> or
      /// <see cref="SQLiteDataReader.GetChars" /> method is being called,
      /// this object will contain the parameters for that method.
      /// </param>
      /// <param name="value">
      /// This will be modified by the callback to contain the return value
      /// for the called <see cref="SQLiteDataReader" /> method.
      /// </param>
      internal SQLiteReadValueEventArgs(
          string methodName,
          SQLiteReadArrayEventArgs arrayEventArgs,
          SQLiteDataReaderValue value
          )
      {
          this.methodName = methodName;
          this.arrayEventArgs = arrayEventArgs;
          this.value = value;
      }
      #endregion

      /////////////////////////////////////////////////////////////////////////

      #region Public Properties
      /// <summary>
      /// The name of the <see cref="SQLiteDataReader" /> method that was
      /// responsible for invoking this callback.
      /// </summary>
      public string MethodName
      {
          get { return methodName; }
      }

      /////////////////////////////////////////////////////////////////////////

      /// <summary>
      /// If the <see cref="SQLiteDataReader.GetBytes" /> or
      /// <see cref="SQLiteDataReader.GetChars" /> method is being called,
      /// this object will contain the parameters for that method.
      /// </summary>
      public SQLiteReadArrayEventArgs ArrayEventArgs
      {

Changes to System.Data.SQLite/SQLiteDataReader.cs.

503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
...
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
...
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
...
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
...
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
...
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
...
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
...
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
...
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
...
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
...
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
...
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
...
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
....
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
....
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589

        if ((_flags & SQLiteConnectionFlags.UseConnectionReadValueCallbacks) == SQLiteConnectionFlags.UseConnectionReadValueCallbacks)
        {
            SQLiteDataReaderValue value = new SQLiteDataReaderValue();
            bool complete;

            InvokeReadValueCallback(i, new SQLiteReadValueEventArgs(
                null, value), out complete);

            if (complete)
            {
                if (value.BooleanValue == null)
                    throw new SQLiteException("missing boolean return value");

                return (bool)value.BooleanValue;
................................................................................

        if ((_flags & SQLiteConnectionFlags.UseConnectionReadValueCallbacks) == SQLiteConnectionFlags.UseConnectionReadValueCallbacks)
        {
            SQLiteDataReaderValue value = new SQLiteDataReaderValue();
            bool complete;

            InvokeReadValueCallback(i, new SQLiteReadValueEventArgs(
                null, value), out complete);

            if (complete)
            {
                if (value.ByteValue == null)
                    throw new SQLiteException("missing byte return value");

                return (byte)value.ByteValue;
................................................................................

        if ((_flags & SQLiteConnectionFlags.UseConnectionReadValueCallbacks) == SQLiteConnectionFlags.UseConnectionReadValueCallbacks)
        {
            SQLiteDataReaderValue value = new SQLiteDataReaderValue();
            bool complete;

            InvokeReadValueCallback(i, new SQLiteReadValueEventArgs(
                new SQLiteReadArrayEventArgs(fieldOffset, buffer,
                    bufferoffset, length), value), out complete);

            if (complete)
            {
                byte[] bytes = value.BytesValue;

                if (bytes != null)
                {
................................................................................

        if ((_flags & SQLiteConnectionFlags.UseConnectionReadValueCallbacks) == SQLiteConnectionFlags.UseConnectionReadValueCallbacks)
        {
            SQLiteDataReaderValue value = new SQLiteDataReaderValue();
            bool complete;

            InvokeReadValueCallback(i, new SQLiteReadValueEventArgs(
                null, value), out complete);

            if (complete)
            {
                if (value.CharValue == null)
                    throw new SQLiteException("missing character return value");

                return (char)value.CharValue;
................................................................................

        if ((_flags & SQLiteConnectionFlags.UseConnectionReadValueCallbacks) == SQLiteConnectionFlags.UseConnectionReadValueCallbacks)
        {
            SQLiteDataReaderValue value = new SQLiteDataReaderValue();
            bool complete;

            InvokeReadValueCallback(i, new SQLiteReadValueEventArgs(
                new SQLiteReadArrayEventArgs(fieldoffset, buffer,
                    bufferoffset, length), value), out complete);

            if (complete)
            {
                char[] chars = value.CharsValue;

                if (chars != null)
                {
................................................................................

        if ((_flags & SQLiteConnectionFlags.UseConnectionReadValueCallbacks) == SQLiteConnectionFlags.UseConnectionReadValueCallbacks)
        {
            SQLiteDataReaderValue value = new SQLiteDataReaderValue();
            bool complete;

            InvokeReadValueCallback(i, new SQLiteReadValueEventArgs(
                null, value), out complete);

            if (complete)
            {
                if (value.DateTimeValue == null)
                    throw new SQLiteException("missing date/time return value");

                return (DateTime)value.DateTimeValue;
................................................................................

        if ((_flags & SQLiteConnectionFlags.UseConnectionReadValueCallbacks) == SQLiteConnectionFlags.UseConnectionReadValueCallbacks)
        {
            SQLiteDataReaderValue value = new SQLiteDataReaderValue();
            bool complete;

            InvokeReadValueCallback(i, new SQLiteReadValueEventArgs(
                null, value), out complete);

            if (complete)
            {
                if (value.DecimalValue == null)
                    throw new SQLiteException("missing decimal return value");

                return (decimal)value.DecimalValue;
................................................................................

        if ((_flags & SQLiteConnectionFlags.UseConnectionReadValueCallbacks) == SQLiteConnectionFlags.UseConnectionReadValueCallbacks)
        {
            SQLiteDataReaderValue value = new SQLiteDataReaderValue();
            bool complete;

            InvokeReadValueCallback(i, new SQLiteReadValueEventArgs(
                null, value), out complete);

            if (complete)
            {
                if (value.DoubleValue == null)
                    throw new SQLiteException("missing double return value");

                return (double)value.DoubleValue;
................................................................................

        if ((_flags & SQLiteConnectionFlags.UseConnectionReadValueCallbacks) == SQLiteConnectionFlags.UseConnectionReadValueCallbacks)
        {
            SQLiteDataReaderValue value = new SQLiteDataReaderValue();
            bool complete;

            InvokeReadValueCallback(i, new SQLiteReadValueEventArgs(
                null, value), out complete);

            if (complete)
            {
                if (value.FloatValue == null)
                    throw new SQLiteException("missing float return value");

                return (float)value.FloatValue;
................................................................................

        if ((_flags & SQLiteConnectionFlags.UseConnectionReadValueCallbacks) == SQLiteConnectionFlags.UseConnectionReadValueCallbacks)
        {
            SQLiteDataReaderValue value = new SQLiteDataReaderValue();
            bool complete;

            InvokeReadValueCallback(i, new SQLiteReadValueEventArgs(
                null, value), out complete);

            if (complete)
            {
                if (value.GuidValue == null)
                    throw new SQLiteException("missing guid return value");

                return (Guid)value.GuidValue;
................................................................................

        if ((_flags & SQLiteConnectionFlags.UseConnectionReadValueCallbacks) == SQLiteConnectionFlags.UseConnectionReadValueCallbacks)
        {
            SQLiteDataReaderValue value = new SQLiteDataReaderValue();
            bool complete;

            InvokeReadValueCallback(i, new SQLiteReadValueEventArgs(
                null, value), out complete);

            if (complete)
            {
                if (value.Int16Value == null)
                    throw new SQLiteException("missing int16 return value");

                return (Int16)value.Int16Value;
................................................................................

        if ((_flags & SQLiteConnectionFlags.UseConnectionReadValueCallbacks) == SQLiteConnectionFlags.UseConnectionReadValueCallbacks)
        {
            SQLiteDataReaderValue value = new SQLiteDataReaderValue();
            bool complete;

            InvokeReadValueCallback(i, new SQLiteReadValueEventArgs(
                null, value), out complete);

            if (complete)
            {
                if (value.Int32Value == null)
                    throw new SQLiteException("missing int32 return value");

                return (Int32)value.Int32Value;
................................................................................

        if ((_flags & SQLiteConnectionFlags.UseConnectionReadValueCallbacks) == SQLiteConnectionFlags.UseConnectionReadValueCallbacks)
        {
            SQLiteDataReaderValue value = new SQLiteDataReaderValue();
            bool complete;

            InvokeReadValueCallback(i, new SQLiteReadValueEventArgs(
                null, value), out complete);

            if (complete)
            {
                if (value.Int64Value == null)
                    throw new SQLiteException("missing int64 return value");

                return (Int64)value.Int64Value;
................................................................................

        if ((_flags & SQLiteConnectionFlags.UseConnectionReadValueCallbacks) == SQLiteConnectionFlags.UseConnectionReadValueCallbacks)
        {
            SQLiteDataReaderValue value = new SQLiteDataReaderValue();
            bool complete;

            InvokeReadValueCallback(i, new SQLiteReadValueEventArgs(
                null, value), out complete);

            if (complete)
                return value.StringValue;
        }

        if (i >= PrivateVisibleFieldCount && _keyInfo != null)
            return _keyInfo.GetString(i - PrivateVisibleFieldCount);
................................................................................

        if ((_flags & SQLiteConnectionFlags.UseConnectionReadValueCallbacks) == SQLiteConnectionFlags.UseConnectionReadValueCallbacks)
        {
            SQLiteDataReaderValue value = new SQLiteDataReaderValue();
            bool complete;

            InvokeReadValueCallback(i, new SQLiteReadValueEventArgs(
                null, value), out complete);

            if (complete)
                return value.Value;
        }

        if (i >= PrivateVisibleFieldCount && _keyInfo != null)
            return _keyInfo.GetValue(i - PrivateVisibleFieldCount);







|







 







|







 







|
|







 







|







 







|
|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







 







|







503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
...
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
...
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
...
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
...
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
...
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
...
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
...
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
...
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
...
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
...
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
...
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
...
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
....
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
....
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589

        if ((_flags & SQLiteConnectionFlags.UseConnectionReadValueCallbacks) == SQLiteConnectionFlags.UseConnectionReadValueCallbacks)
        {
            SQLiteDataReaderValue value = new SQLiteDataReaderValue();
            bool complete;

            InvokeReadValueCallback(i, new SQLiteReadValueEventArgs(
                "GetBoolean", null, value), out complete);

            if (complete)
            {
                if (value.BooleanValue == null)
                    throw new SQLiteException("missing boolean return value");

                return (bool)value.BooleanValue;
................................................................................

        if ((_flags & SQLiteConnectionFlags.UseConnectionReadValueCallbacks) == SQLiteConnectionFlags.UseConnectionReadValueCallbacks)
        {
            SQLiteDataReaderValue value = new SQLiteDataReaderValue();
            bool complete;

            InvokeReadValueCallback(i, new SQLiteReadValueEventArgs(
                "GetByte", null, value), out complete);

            if (complete)
            {
                if (value.ByteValue == null)
                    throw new SQLiteException("missing byte return value");

                return (byte)value.ByteValue;
................................................................................

        if ((_flags & SQLiteConnectionFlags.UseConnectionReadValueCallbacks) == SQLiteConnectionFlags.UseConnectionReadValueCallbacks)
        {
            SQLiteDataReaderValue value = new SQLiteDataReaderValue();
            bool complete;

            InvokeReadValueCallback(i, new SQLiteReadValueEventArgs(
                "GetBytes", new SQLiteReadArrayEventArgs(fieldOffset,
                    buffer, bufferoffset, length), value), out complete);

            if (complete)
            {
                byte[] bytes = value.BytesValue;

                if (bytes != null)
                {
................................................................................

        if ((_flags & SQLiteConnectionFlags.UseConnectionReadValueCallbacks) == SQLiteConnectionFlags.UseConnectionReadValueCallbacks)
        {
            SQLiteDataReaderValue value = new SQLiteDataReaderValue();
            bool complete;

            InvokeReadValueCallback(i, new SQLiteReadValueEventArgs(
                "GetChar", null, value), out complete);

            if (complete)
            {
                if (value.CharValue == null)
                    throw new SQLiteException("missing character return value");

                return (char)value.CharValue;
................................................................................

        if ((_flags & SQLiteConnectionFlags.UseConnectionReadValueCallbacks) == SQLiteConnectionFlags.UseConnectionReadValueCallbacks)
        {
            SQLiteDataReaderValue value = new SQLiteDataReaderValue();
            bool complete;

            InvokeReadValueCallback(i, new SQLiteReadValueEventArgs(
                "GetChars", new SQLiteReadArrayEventArgs(fieldoffset,
                    buffer, bufferoffset, length), value), out complete);

            if (complete)
            {
                char[] chars = value.CharsValue;

                if (chars != null)
                {
................................................................................

        if ((_flags & SQLiteConnectionFlags.UseConnectionReadValueCallbacks) == SQLiteConnectionFlags.UseConnectionReadValueCallbacks)
        {
            SQLiteDataReaderValue value = new SQLiteDataReaderValue();
            bool complete;

            InvokeReadValueCallback(i, new SQLiteReadValueEventArgs(
                "GetDateTime", null, value), out complete);

            if (complete)
            {
                if (value.DateTimeValue == null)
                    throw new SQLiteException("missing date/time return value");

                return (DateTime)value.DateTimeValue;
................................................................................

        if ((_flags & SQLiteConnectionFlags.UseConnectionReadValueCallbacks) == SQLiteConnectionFlags.UseConnectionReadValueCallbacks)
        {
            SQLiteDataReaderValue value = new SQLiteDataReaderValue();
            bool complete;

            InvokeReadValueCallback(i, new SQLiteReadValueEventArgs(
                "GetDecimal", null, value), out complete);

            if (complete)
            {
                if (value.DecimalValue == null)
                    throw new SQLiteException("missing decimal return value");

                return (decimal)value.DecimalValue;
................................................................................

        if ((_flags & SQLiteConnectionFlags.UseConnectionReadValueCallbacks) == SQLiteConnectionFlags.UseConnectionReadValueCallbacks)
        {
            SQLiteDataReaderValue value = new SQLiteDataReaderValue();
            bool complete;

            InvokeReadValueCallback(i, new SQLiteReadValueEventArgs(
                "GetDouble", null, value), out complete);

            if (complete)
            {
                if (value.DoubleValue == null)
                    throw new SQLiteException("missing double return value");

                return (double)value.DoubleValue;
................................................................................

        if ((_flags & SQLiteConnectionFlags.UseConnectionReadValueCallbacks) == SQLiteConnectionFlags.UseConnectionReadValueCallbacks)
        {
            SQLiteDataReaderValue value = new SQLiteDataReaderValue();
            bool complete;

            InvokeReadValueCallback(i, new SQLiteReadValueEventArgs(
                "GetFloat", null, value), out complete);

            if (complete)
            {
                if (value.FloatValue == null)
                    throw new SQLiteException("missing float return value");

                return (float)value.FloatValue;
................................................................................

        if ((_flags & SQLiteConnectionFlags.UseConnectionReadValueCallbacks) == SQLiteConnectionFlags.UseConnectionReadValueCallbacks)
        {
            SQLiteDataReaderValue value = new SQLiteDataReaderValue();
            bool complete;

            InvokeReadValueCallback(i, new SQLiteReadValueEventArgs(
                "GetGuid", null, value), out complete);

            if (complete)
            {
                if (value.GuidValue == null)
                    throw new SQLiteException("missing guid return value");

                return (Guid)value.GuidValue;
................................................................................

        if ((_flags & SQLiteConnectionFlags.UseConnectionReadValueCallbacks) == SQLiteConnectionFlags.UseConnectionReadValueCallbacks)
        {
            SQLiteDataReaderValue value = new SQLiteDataReaderValue();
            bool complete;

            InvokeReadValueCallback(i, new SQLiteReadValueEventArgs(
                "GetInt16", null, value), out complete);

            if (complete)
            {
                if (value.Int16Value == null)
                    throw new SQLiteException("missing int16 return value");

                return (Int16)value.Int16Value;
................................................................................

        if ((_flags & SQLiteConnectionFlags.UseConnectionReadValueCallbacks) == SQLiteConnectionFlags.UseConnectionReadValueCallbacks)
        {
            SQLiteDataReaderValue value = new SQLiteDataReaderValue();
            bool complete;

            InvokeReadValueCallback(i, new SQLiteReadValueEventArgs(
                "GetInt32", null, value), out complete);

            if (complete)
            {
                if (value.Int32Value == null)
                    throw new SQLiteException("missing int32 return value");

                return (Int32)value.Int32Value;
................................................................................

        if ((_flags & SQLiteConnectionFlags.UseConnectionReadValueCallbacks) == SQLiteConnectionFlags.UseConnectionReadValueCallbacks)
        {
            SQLiteDataReaderValue value = new SQLiteDataReaderValue();
            bool complete;

            InvokeReadValueCallback(i, new SQLiteReadValueEventArgs(
                "GetInt64", null, value), out complete);

            if (complete)
            {
                if (value.Int64Value == null)
                    throw new SQLiteException("missing int64 return value");

                return (Int64)value.Int64Value;
................................................................................

        if ((_flags & SQLiteConnectionFlags.UseConnectionReadValueCallbacks) == SQLiteConnectionFlags.UseConnectionReadValueCallbacks)
        {
            SQLiteDataReaderValue value = new SQLiteDataReaderValue();
            bool complete;

            InvokeReadValueCallback(i, new SQLiteReadValueEventArgs(
                "GetString", null, value), out complete);

            if (complete)
                return value.StringValue;
        }

        if (i >= PrivateVisibleFieldCount && _keyInfo != null)
            return _keyInfo.GetString(i - PrivateVisibleFieldCount);
................................................................................

        if ((_flags & SQLiteConnectionFlags.UseConnectionReadValueCallbacks) == SQLiteConnectionFlags.UseConnectionReadValueCallbacks)
        {
            SQLiteDataReaderValue value = new SQLiteDataReaderValue();
            bool complete;

            InvokeReadValueCallback(i, new SQLiteReadValueEventArgs(
                "GetValue", null, value), out complete);

            if (complete)
                return value.Value;
        }

        if (i >= PrivateVisibleFieldCount && _keyInfo != null)
            return _keyInfo.GetValue(i - PrivateVisibleFieldCount);