This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Running on the page, in the browser | |
// This API will go live in early 2020 | |
// It will be the only API available after a 6-week deprecation period | |
if (!ethereum || !ethereum.isMetaMask) { | |
throw new Error('Please install MetaMask.') | |
} | |
/*********************************************************/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class ObjectDataReader<T> : DbDataReader | |
{ | |
private IEnumerator<T> _iterator; | |
private IDictionary<string, int> _propertyNameToOrdinal = new Dictionary<string, int>(); | |
private IDictionary<int, string> _ordinalToPropertyName = new Dictionary<int, string>(); | |
private Func<T, object>[] _getPropertyValueFuncs; | |
public ObjectDataReader(IEnumerator<T> items) | |
{ | |
_iterator = items ?? throw new ArgumentNullException(nameof(items)); |