internal static bool IsDefined(SupportedAddressingMode value) { if ((value != SupportedAddressingMode.Anonymous) && (value != SupportedAddressingMode.NonAnonymous)) { return(value == SupportedAddressingMode.Mixed); } return(true); }
internal static bool IsDefined(SupportedAddressingMode value) { if ((value != SupportedAddressingMode.Anonymous) && (value != SupportedAddressingMode.NonAnonymous)) { return (value == SupportedAddressingMode.Mixed); } return true; }
internal static void AddWSAddressingAssertion(MetadataExporter exporter, PolicyConversionContext context, AddressingVersion addressVersion) { XmlElement xmlElement; string str; if (addressVersion == AddressingVersion.WSAddressingAugust2004) { xmlElement = WSAddressingHelper.XmlDoc.CreateElement("wsap", "UsingAddressing", "http://schemas.xmlsoap.org/ws/2004/08/addressing/policy"); } else if (addressVersion != AddressingVersion.WSAddressing10) { if (addressVersion != AddressingVersion.None) { throw Microsoft.ServiceBus.Messaging.FxTrace.Exception.AsError(new InvalidOperationException(string.Concat("This addressing version is not supported: ", addressVersion.ToString())), null); } xmlElement = null; } else if (exporter.PolicyVersion != PolicyVersion.Policy12) { xmlElement = WSAddressingHelper.XmlDoc.CreateElement("wsam", "Addressing", "http://www.w3.org/2007/05/addressing/metadata"); SupportedAddressingMode item = SupportedAddressingMode.Anonymous; string name = typeof(SupportedAddressingMode).Name; if (exporter.State.ContainsKey(name) && exporter.State[name] as SupportedAddressingMode != SupportedAddressingMode.Anonymous) { item = (SupportedAddressingMode)exporter.State[name]; } if (item != SupportedAddressingMode.Mixed) { str = (item != SupportedAddressingMode.Anonymous ? "NonAnonymousResponses" : "AnonymousResponses"); XmlElement xmlElement1 = WSAddressingHelper.XmlDoc.CreateElement("wsp", "Policy", "http://www.w3.org/ns/ws-policy"); XmlElement xmlElement2 = WSAddressingHelper.XmlDoc.CreateElement("wsam", str, "http://www.w3.org/2007/05/addressing/metadata"); xmlElement1.AppendChild(xmlElement2); xmlElement.AppendChild(xmlElement1); } } else { xmlElement = WSAddressingHelper.XmlDoc.CreateElement("wsaw", "UsingAddressing", "http://www.w3.org/2006/05/addressing/wsdl"); } if (xmlElement != null) { context.GetBindingAssertions().Add(xmlElement); } }
internal static bool IsDefined(SupportedAddressingMode value) { return (value == SupportedAddressingMode.Anonymous || value == SupportedAddressingMode.NonAnonymous || value == SupportedAddressingMode.Mixed); }
internal static bool IsDefined(SupportedAddressingMode value) { return(value == SupportedAddressingMode.Anonymous || value == SupportedAddressingMode.NonAnonymous || value == SupportedAddressingMode.Mixed); }