PicklesDoc.Pickles.ObjectModel.Mapper.MapToFeatureElement C# (CSharp) Method

MapToFeatureElement() private method

private MapToFeatureElement ( Gherkin.Ast sd ) : IFeatureElement
sd Gherkin.Ast
return IFeatureElement
        private IFeatureElement MapToFeatureElement(G.ScenarioDefinition sd)
        {
            if (sd == null)
            {
                return null;
            }

            var scenario = sd as G.Scenario;
            if (scenario != null)
            {
                return this.MapToScenario(scenario);
            }

            var scenarioOutline = sd as G.ScenarioOutline;
            if (scenarioOutline != null)
            {
                return this.MapToScenarioOutline(scenarioOutline);
            }

            var background = sd as G.Background;
            if (background != null)
            {
                return this.MapToScenario(background);
            }

            throw new ArgumentException("Only arguments of type Scenario, ScenarioOutline and Background are supported.");
        }
    }