public static ReliableSessionBindingElementImporter.Wsrm11PolicyAlternative ImportAlternative(MetadataImporter importer, IEnumerable <XmlElement> alternative) { ReliableSessionBindingElementImporter.State security = ReliableSessionBindingElementImporter.State.Security; ReliableSessionBindingElementImporter.Wsrm11PolicyAlternative alternative2 = new ReliableSessionBindingElementImporter.Wsrm11PolicyAlternative(); foreach (XmlElement element in alternative) { switch (security) { case ReliableSessionBindingElementImporter.State.Security: security = ReliableSessionBindingElementImporter.State.DeliveryAssurance; if (alternative2.TryImportSequenceSTR(element)) { continue; } break; case ReliableSessionBindingElementImporter.State.DeliveryAssurance: security = ReliableSessionBindingElementImporter.State.Done; if (alternative2.TryImportDeliveryAssurance(importer, element)) { continue; } break; } string message = System.ServiceModel.SR.GetString("UnexpectedXmlChildNode", new object[] { element.LocalName, element.NodeType, "RMAssertion" }); throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidChannelBindingException(message)); } return(alternative2); }
public static ReliableSessionBindingElementImporter.Wsrm11PolicyAlternative ImportAlternative(MetadataImporter importer, IEnumerable<XmlElement> alternative) { ReliableSessionBindingElementImporter.State security = ReliableSessionBindingElementImporter.State.Security; ReliableSessionBindingElementImporter.Wsrm11PolicyAlternative alternative2 = new ReliableSessionBindingElementImporter.Wsrm11PolicyAlternative(); foreach (XmlElement element in alternative) { switch (security) { case ReliableSessionBindingElementImporter.State.Security: security = ReliableSessionBindingElementImporter.State.DeliveryAssurance; if (alternative2.TryImportSequenceSTR(element)) { continue; } break; case ReliableSessionBindingElementImporter.State.DeliveryAssurance: security = ReliableSessionBindingElementImporter.State.Done; if (alternative2.TryImportDeliveryAssurance(importer, element)) { continue; } break; } string message = System.ServiceModel.SR.GetString("UnexpectedXmlChildNode", new object[] { element.LocalName, element.NodeType, "RMAssertion" }); throw DiagnosticUtility.ExceptionUtility.ThrowHelperError(new InvalidChannelBindingException(message)); } return alternative2; }