/// <summary> /// Get all the properties. /// </summary> /// <param name="data"></param> /// <param name="config">The configuration to use</param> /// <returns></returns> /// <exception cref="ArgumentNullException"> /// Thrown if the supplied flow data is null. /// </exception> protected virtual Dictionary <string, object> GetAllProperties( IFlowData data, PipelineConfig config) { if (data == null) { throw new ArgumentNullException(nameof(data)); } if (config == null) { throw new ArgumentNullException(nameof(config)); } Dictionary <string, object> allProperties = new Dictionary <string, object>(); foreach (var element in data.ElementDataAsDictionary().Where(elementData => _elementExclusionList.Contains(elementData.Key) == false)) { if (allProperties.ContainsKey(element.Key.ToLowerInvariant()) == false) { var values = GetValues(data, element.Key.ToLowerInvariant(), (element.Value as IElementData).AsDictionary(), config); allProperties.Add(element.Key.ToLowerInvariant(), values); } } return(allProperties); }
private SetHeadersData GetFromFlowData(IFlowData data) { var output = data.ElementDataAsDictionary(); var elementOutput = output[_element.ElementDataKey]; Assert.IsNotNull(elementOutput); Assert.IsInstanceOfType(elementOutput, typeof(SetHeadersData)); var typedOutput = elementOutput as SetHeadersData; Assert.IsNotNull(typedOutput.ResponseHeaderDictionary); return(typedOutput); }
protected virtual Dictionary <String, object> GetAllProperties(IFlowData data) { if (data == null) { throw new ArgumentNullException(nameof(data)); } Dictionary <string, object> allProperties = new Dictionary <string, object>(); foreach (var element in data.ElementDataAsDictionary()) { if (allProperties.ContainsKey(element.Key.ToLowerInvariant()) == false) { var values = GetValues((element.Value as IElementData).AsDictionary()); allProperties.Add(element.Key.ToLowerInvariant(), values); } } return(allProperties); }