Beispiel #1
0
        public V GetValue(DateTime time, string key)
        {
            AvroRandomAccessReader <V> reader = GetReader(ValueLocationStrategy.GetLocation(time, key));

            if (reader == null)
            {
                throw new Exception(string.Format("Document could not be located: {0} - {1}", time, key));
            }
            return(reader.Get(key));
        }
Beispiel #2
0
        public bool TryGetDocument(DateTime time, string key, out V value)
        {
            AvroRandomAccessReader <V> reader = GetReader(ValueLocationStrategy.GetLocation(time, key));

            if (reader != null)
            {
                value = reader.Get(key);
                return(true);
            }
            value = default(V);
            return(false);
        }