Example #1
0
        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);
            }
        }
Example #2
0
 public ReferencePrototype(PartitionData PD)
 {
     PDataAdaptor = new PartitionDataAdpator(PD);
     Positions    = new PositionData();
     GraphCache   = new GraphBuildCache(PDataAdaptor);
 }
Example #3
0
 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);
 }