19 using System.Collections.Generic;
29 private readonly
string _pythonTypeName;
30 private readonly dynamic _pythonReader;
31 private readonly dynamic _pythonGetSource;
32 private readonly dynamic _pythonData;
33 private readonly dynamic _defaultResolution;
34 private readonly dynamic _supportedResolutions;
35 private readonly dynamic _isSparseData;
36 private readonly dynamic _requiresMapping;
37 private DateTime _endTime;
47 public override DateTime
EndTime
51 return _endTime ==
default ?
Time : _endTime;
78 _pythonData = pythonData;
82 _requiresMapping = pythonData.GetMethod(
"RequiresMapping");
83 _isSparseData = pythonData.GetMethod(
"IsSparseData");
84 _defaultResolution = pythonData.GetMethod(
"DefaultResolution");
85 _supportedResolutions = pythonData.GetMethod(
"SupportedResolutions");
86 _pythonReader = pythonData.GetMethod(
"Reader");
87 _pythonGetSource = pythonData.GetMethod(
"GetSource");
88 _pythonTypeName = pythonData.GetPythonType().GetAssemblyName().Name;
103 var source = _pythonGetSource(config, date, isLiveMode);
120 var data = _pythonReader(config, line, date, isLiveMode);
121 var result = (data as PyObject).GetAndDispose<BaseData>();
135 if (_requiresMapping ==
null)
137 return base.RequiresMapping();
141 return _requiresMapping();
152 if (_isSparseData ==
null)
154 return base.IsSparseData();
158 return _isSparseData();
169 if (_defaultResolution ==
null)
171 return base.DefaultResolution();
175 return _defaultResolution();
186 if (_supportedResolutions ==
null)
188 return base.SupportedResolutions();
192 return _supportedResolutions();
201 public object this[
string index]
210 SetProperty(index, value is
double ? value.ConvertInvariant<decimal>() : value);
223 return (
string)
GetProperty(
"__typename") == type.FullName;
225 return GetType() == type;