Example #1
0
 /// <summary>
 /// Initializes a new <see cref="StObjMapTestHelper"/>.
 /// </summary>
 /// <param name="config">The configuration.</param>
 /// <param name="monitor">The monitor helper.</param>
 public StObjMapTestHelper(TestHelperConfiguration config, IMonitorTestHelper monitor)
 {
     _config               = config;
     _monitor              = monitor;
     _binPathName          = _binPathNamePrefix;
     _stObjMapRetryOnError = _config.DeclareBoolean("StObjMap/StObjMapRetryOnError",
                                                    false,
                                                    "By default if the first attempt to obtain the current StObjMap failed, subsequent attempts immediately throw. Set it to true to always retry.",
                                                    () => _stObjMapRetryOnError.ToString()).Value;
 }
        internal StObjSetupTestHelper(TestHelperConfiguration config, ICKSetupTestHelper ckSetup, IStObjMapTestHelper stObjMap)
        {
            _ckSetup  = ckSetup;
            _stObjMap = stObjMap;
            stObjMap.StObjMapLoading += OnStObjMapLoading;

            _generateSourceFiles = config.DeclareBoolean("StObjSetup/StObjGenerateSourceFiles",
                                                         true,
                                                         "Whether the '$StObjGen/G0.cs' source file must be generated in the ProjectPath folder.",
                                                         () => _generateSourceFiles.ToString()).Value;
            _revertOrderingNames = config.DeclareBoolean("StObjSetup/StObjRevertOrderingNames",
                                                         false,
                                                         "Whether the ordering of StObj that share the same rank in the dependency graph must be inverted. This configuration can be reused by Aspects that also use topology sort instead of introducing another similar option.",
                                                         () => _revertOrderingNames.ToString()).Value;
            _traceGraphOrdering = config.DeclareBoolean("StObjSetup/StObjTraceGraphOrdering",
                                                        false,
                                                        "Whether the dependency graph (the set of IDependentItem) associated to the StObj objects must be send to the monitor before and after sorting. This configuration can be reused by aspects that also use topology sort instead of introducing another similar option.",
                                                        () => _traceGraphOrdering.ToString()).Value;
        }