Ejemplo n.º 1
0
 public StrategyScopeLocatorExecutionData(
     UIComponent component,
     ScopeSource scopeSource,
     bool isSafely,
     IEnumerable <StrategyScopeLocatorLayerExecutionUnit> layerUnits,
     StrategyScopeLocatorExecutionUnit finalUnit)
 {
     Component   = component;
     ScopeSource = scopeSource;
     IsSafely    = isSafely;
     LayerUnits  = layerUnits;
     FinalUnit   = finalUnit;
 }
        private static void PostProcessOuterXPath(StrategyScopeLocatorLayerExecutionUnit[] layerExecutionUnits, StrategyScopeLocatorExecutionUnit finalExecutionUnit)
        {
            for (int i = 0; i < layerExecutionUnits.Length; i++)
            {
                ComponentScopeLocateOptions scopeLocateOptions = i == layerExecutionUnits.Length - 1
                    ? finalExecutionUnit.ScopeLocateOptions
                    : layerExecutionUnits[i + 1].ScopeLocateOptions;

                scopeLocateOptions.OuterXPath = scopeLocateOptions.OuterXPath
                                                ?? layerExecutionUnits[i].ScopeContextResolver.DefaultOuterXPath;
            }
        }