System.Xaml.AmbientProvider.DoGetAllAmbientValues C# (CSharp) Method

DoGetAllAmbientValues() private method

private DoGetAllAmbientValues ( IEnumerable ceilingTypes, bool searchLiveStackOnly, IEnumerable types ) : IEnumerable
ceilingTypes IEnumerable
searchLiveStackOnly bool
types IEnumerable
return IEnumerable
		IEnumerable<AmbientPropertyValue> DoGetAllAmbientValues (IEnumerable<XamlType> ceilingTypes, bool searchLiveStackOnly, IEnumerable<XamlType> types, params XamlMember [] properties)
		{
			if (searchLiveStackOnly) {
				if (live_stack.Count > 0) {
					// pop, call recursively, then push back.
					var p = live_stack.Pop ();
					if (p.RetrievedProperty != null && ceilingTypes != null && ceilingTypes.Contains (p.RetrievedProperty.Type))
						yield break;
					if (DoesAmbientPropertyApply (p, types, properties))
						yield return p;

					foreach (var i in GetAllAmbientValues (ceilingTypes, searchLiveStackOnly, types, properties))
						yield return i;

					live_stack.Push (p);
				}
			} else {
				// FIXME: does ceilingTypes matter?
				foreach (var p in values)
					if (DoesAmbientPropertyApply (p, types, properties))
						yield return p;
			}
		}