public void ExtractPositionData() { if (!TreatyExposure) { throw new InvalidOperationException("Cannot use this method to get position data for primary contract"); } if (null != _contractExposure && null != _contractExposure.Positions) { Dictionary <string, HashSet <long> > PosDict = _contractExposure.Positions .Where(elem => null != elem) .ToDictionary(elem => elem.PositionName.ToUpper().Trim(), elem => new HashSet <long>(elem.LossSourcePositionIDs.ToArray())); _positions = new PositionData(PosDict); } }
public ReferencePrototype(PartitionData PD) { PDataAdaptor = new PartitionDataAdpator(PD); Positions = new PositionData(); GraphCache = new GraphBuildCache(PDataAdaptor); }
private void InitilizePrototype(PartitionData PD, RAPSettings _rapsettings, SubSamplingAnalysisSetting _subSamplingSettings, JavascriptContext JSContext) { PDataAdaptor = new PartitionDataAdpator(PD, JSContext, _subSamplingSettings); Positions = new PositionData(); GraphCache = new GraphBuildCache(PDataAdaptor, _rapsettings); }