Beispiel #1
0
        private static FaultSubcode CreateSubcodes(IEnumerable <XmlQualifiedName> subcodes)
        {
            FaultSubcode last = null;

            return(subcodes.Reverse().Aggregate(last, (prev, code) => new FaultSubcode {
                Value = code, Subcode = prev
            }));
        }
 private static IEnumerable<XmlQualifiedName> ExtractSubcodes(FaultSubcode rootSubcode)
 {
     if (rootSubcode == null)
     {
         yield break;
     }
     yield return rootSubcode.Value;
     foreach (var subcode in ExtractSubcodes(rootSubcode.Subcode))
     {
         yield return subcode;
     }
 }
Beispiel #3
0
        private static IEnumerable <XmlQualifiedName> ExtractSubcodes(FaultSubcode rootSubcode)
        {
            if (rootSubcode == null)
            {
                yield break;
            }
            yield return(rootSubcode.Value);

            foreach (var subcode in ExtractSubcodes(rootSubcode.Subcode))
            {
                yield return(subcode);
            }
        }