public Binding () { extensions = new ServiceDescriptionFormatExtensionCollection (this); operations = new OperationBindingCollection (this); serviceDescription = null; type = XmlQualifiedName.Empty; }
public Import () { extensions = new ServiceDescriptionFormatExtensionCollection (this); location = String.Empty; ns = String.Empty; serviceDescription = null; }
public void Add () { ServiceDescriptionFormatExtensionCollection c = new ServiceDescriptionFormatExtensionCollection (new ServiceDescription ()); c.Add (0); }
public void Add2 () { ServiceDescriptionFormatExtensionCollection c = new ServiceDescriptionFormatExtensionCollection (new ServiceDescription ()); c.Add (new XmlDocument ().CreateElement ("foo")); }
internal static void ReadExtension(XmlDocument doc, XmlReader reader, object ob) { ServiceDescriptionFormatExtensionCollection extensions = ExtensionManager.GetExtensionPoint(ob); if (extensions != null) { ExtensionInfo info = ExtensionManager.GetFormatExtensionInfo(reader.LocalName, reader.NamespaceURI); if (info != null) { object extension = info.Serializer.Deserialize(reader); extensions.Add((ServiceDescriptionFormatExtension)extension); return; } } //No XmlFormatExtensionPoint attribute found #if NET_2_0 //Add to DocumentableItem.Extensions property DocumentableItem item = ob as DocumentableItem; if (item == null) { reader.Skip(); return; } item.Extensions.Add(doc.ReadNode(reader)); #else reader.Skip(); #endif }
public OperationBinding () { extensions = new ServiceDescriptionFormatExtensionCollection (this); faults = new FaultBindingCollection (this); input = null; output = null; }
public void Find () { ServiceDescriptionFormatExtensionCollection c = new ServiceDescriptionFormatExtensionCollection (new ServiceDescription ()); c.Add (new MySoapBinding ()); Assert.IsNotNull (c.Find (typeof (SoapBinding))); }
public Binding() { extensions = new ServiceDescriptionFormatExtensionCollection(this); operations = new OperationBindingCollection(this); serviceDescription = null; type = XmlQualifiedName.Empty; }
public MessagePart () { element = XmlQualifiedName.Empty; message = null; type = XmlQualifiedName.Empty; extensions = new ServiceDescriptionFormatExtensionCollection (this); }
public OperationBinding() { extensions = new ServiceDescriptionFormatExtensionCollection(this); faults = new FaultBindingCollection(this); input = null; output = null; }
public Import() { extensions = new ServiceDescriptionFormatExtensionCollection(this); location = String.Empty; ns = String.Empty; serviceDescription = null; }
// [....], this could be simplified if we used generics. internal static void ConvertExtensions(WsdlNS.ServiceDescriptionFormatExtensionCollection extensions, EnvelopeVersion version, ConvertExtension conversionMethod) { bool foundOne = false; for (int i = extensions.Count - 1; i >= 0; i--) { object o = extensions[i]; if (conversionMethod(ref o, version)) { if (o == null) { extensions.Remove(extensions[i]); } else { extensions[i] = o; } foundOne = true; } } if (!foundOne) { object o = null; conversionMethod(ref o, version); if (o != null) { extensions.Add(o); } } }
public MessagePart() { element = XmlQualifiedName.Empty; message = null; type = XmlQualifiedName.Empty; extensions = new ServiceDescriptionFormatExtensionCollection(this); }
public PortType() { operations = new OperationCollection(this); serviceDescription = null; #if NET_2_0 extensions = new ServiceDescriptionFormatExtensionCollection(this); #endif }
public Operation() { faults = new OperationFaultCollection(this); messages = new OperationMessageCollection(this); parameterOrder = null; portType = null; extensions = new ServiceDescriptionFormatExtensionCollection(this); }
public PortType () { operations = new OperationCollection (this); serviceDescription = null; #if NET_2_0 extensions = new ServiceDescriptionFormatExtensionCollection (this); #endif }
public Operation () { faults = new OperationFaultCollection (this); messages = new OperationMessageCollection (this); parameterOrder = null; portType = null; extensions = new ServiceDescriptionFormatExtensionCollection (this); }
public Service() { extensions = new ServiceDescriptionFormatExtensionCollection(this); #if !NET_2_0 name = String.Empty; #endif ports = new PortCollection(this); serviceDescription = null; }
public Service () { extensions = new ServiceDescriptionFormatExtensionCollection (this); #if !NET_2_0 name = String.Empty; #endif ports = new PortCollection (this); serviceDescription = null; }
public Port () { binding = null; extensions = new ServiceDescriptionFormatExtensionCollection (this); #if !NET_2_0 name = String.Empty; #endif service = null; }
public Port() { binding = null; extensions = new ServiceDescriptionFormatExtensionCollection(this); #if !NET_2_0 name = String.Empty; #endif service = null; }
public Binding() { extensions = new ServiceDescriptionFormatExtensionCollection(this); #if !NET_2_0 name = String.Empty; #endif operations = new OperationBindingCollection(this); serviceDescription = null; type = XmlQualifiedName.Empty; }
public OperationBinding () { extensions = new ServiceDescriptionFormatExtensionCollection (this); faults = new FaultBindingCollection (this); input = null; #if !NET_2_0 name = String.Empty; #endif output = null; }
public OperationBinding() { extensions = new ServiceDescriptionFormatExtensionCollection(this); faults = new FaultBindingCollection(this); input = null; #if !NET_2_0 name = String.Empty; #endif output = null; }
public Binding () { extensions = new ServiceDescriptionFormatExtensionCollection (this); #if !NET_2_0 name = String.Empty; #endif operations = new OperationBindingCollection (this); serviceDescription = null; type = XmlQualifiedName.Empty; }
public Message() { #if !NET_2_0 name = String.Empty; #endif #if NET_2_0 extensions = new ServiceDescriptionFormatExtensionCollection(this); #endif parts = new MessagePartCollection(this); serviceDescription = null; }
public Message () { #if !NET_2_0 name = String.Empty; #endif #if NET_2_0 extensions = new ServiceDescriptionFormatExtensionCollection (this); #endif parts = new MessagePartCollection (this); serviceDescription = null; }
void AddExtensionNamespaces(XmlSerializerNamespaces ns, ServiceDescriptionFormatExtensionCollection extensions) { foreach (ServiceDescriptionFormatExtension ext in extensions) { ExtensionInfo einf = ExtensionManager.GetFormatExtensionInfo(ext.GetType()); foreach (XmlQualifiedName qname in einf.NamespaceDeclarations) { ns.Add(qname.Name, qname.Namespace); } } }
private static bool CheckExtensions(ServiceDescriptionFormatExtensionCollection extensions) { foreach (ServiceDescriptionFormatExtension extension in extensions) { if (extension.Required) { return(false); } } return(true); }
public MessagePart() { element = XmlQualifiedName.Empty; message = null; #if !NET_2_0 name = String.Empty; #endif type = XmlQualifiedName.Empty; #if NET_2_0 extensions = new ServiceDescriptionFormatExtensionCollection(this); #endif }
public MessagePart () { element = XmlQualifiedName.Empty; message = null; #if !NET_2_0 name = String.Empty; #endif type = XmlQualifiedName.Empty; #if NET_2_0 extensions = new ServiceDescriptionFormatExtensionCollection (this); #endif }
internal static void WriteExtensions(XmlWriter writer, object ob) { ServiceDescriptionFormatExtensionCollection extensions = ExtensionManager.GetExtensionPoint(ob); if (extensions != null) { foreach (ServiceDescriptionFormatExtension ext in extensions) { WriteExtension(writer, ext); } } }
private static void RemovePolicyFormatFromExtensions(ServiceDescriptionFormatExtensionCollection extensions) { var toRemove = new List<XmlElement>(); extensions.OfType<XmlElement>() .Where(element => element.Name.EndsWith(":Policy") || element.Name.EndsWith(":PolicyReference")) .ToList() .ForEach(toRemove.Add); toRemove.ForEach(extensions.Remove); }
public Operation() { faults = new OperationFaultCollection(this); messages = new OperationMessageCollection(this); #if !NET_2_0 name = String.Empty; #endif parameterOrder = null; portType = null; #if NET_2_0 extensions = new ServiceDescriptionFormatExtensionCollection(this); #endif }
public Operation () { faults = new OperationFaultCollection (this); messages = new OperationMessageCollection (this); #if !NET_2_0 name = String.Empty; #endif parameterOrder = null; portType = null; #if NET_2_0 extensions = new ServiceDescriptionFormatExtensionCollection (this); #endif }
public ServiceDescription () { bindings = new BindingCollection (this); extensions = new ServiceDescriptionFormatExtensionCollection (this); imports = new ImportCollection (this); messages = new MessageCollection (this); portTypes = new PortTypeCollection (this); serviceDescriptions = null; services = new ServiceCollection (this); targetNamespace = null; types = new Types (); }
public ServiceDescription() { bindings = new BindingCollection(this); extensions = new ServiceDescriptionFormatExtensionCollection(this); imports = new ImportCollection(this); messages = new MessageCollection(this); portTypes = new PortTypeCollection(this); serviceDescriptions = null; services = new ServiceCollection(this); targetNamespace = null; types = new Types(); }
private static IEnumerable <XmlElement> FindAllElements(WsdlNS.ServiceDescriptionFormatExtensionCollection extensions, string elementName) { List <XmlElement> policyReferences = new List <XmlElement>(); for (int i = 0; i < extensions.Count; i++) { XmlElement element = extensions[i] as XmlElement; if (element != null && element.LocalName == elementName) { policyReferences.Add(element); } } return(policyReferences); }
public ServiceDescription() { bindings = new BindingCollection(this); extensions = new ServiceDescriptionFormatExtensionCollection(this); imports = new ImportCollection(this); messages = new MessageCollection(this); #if !NET_2_0 // name = String.Empty; #endif portTypes = new PortTypeCollection(this); serviceDescriptions = null; services = new ServiceCollection(this); targetNamespace = null; types = new Types(); }
private static void UpdatePolicyReference(WsdlNS.ServiceDescriptionFormatExtensionCollection extensions, string oldBindingName, string newBindingName) { IEnumerable <XmlElement> bindingPolicyReferences = FindAllElements(extensions, MetadataStrings.WSPolicy.Elements.PolicyReference); string policyReferencePrefixFormat = "#{0}_"; foreach (XmlElement policyReferenceElement in bindingPolicyReferences) { XmlNode policyReference = policyReferenceElement.Attributes.GetNamedItem(MetadataStrings.WSPolicy.Attributes.URI); string policyReferenceValue = policyReference.Value; string policyReferenceValueWithOldBindingName = string.Format(CultureInfo.InvariantCulture, policyReferencePrefixFormat, oldBindingName); string policyReferenceValueWithNewBindingName = string.Format(CultureInfo.InvariantCulture, policyReferencePrefixFormat, newBindingName); if (policyReference != null && policyReferenceValue != null && policyReferenceValue.StartsWith(policyReferenceValueWithOldBindingName, StringComparison.Ordinal)) { policyReference.Value = policyReferenceValueWithNewBindingName + policyReference.Value.Substring(policyReferenceValueWithOldBindingName.Length); } } }
void AddExtensionNamespaces(XmlSerializerNamespaces ns, ServiceDescriptionFormatExtensionCollection extensions) { foreach (object o in extensions) { ServiceDescriptionFormatExtension ext = o as ServiceDescriptionFormatExtension; if (ext == null) { // o can be XmlElement, skipping that continue; } ExtensionInfo einf = ExtensionManager.GetFormatExtensionInfo(ext.GetType()); foreach (XmlQualifiedName qname in einf.NamespaceDeclarations) { ns.Add(qname.Name, qname.Namespace); } } }
internal static void WriteExtensions(XmlWriter writer, object ob) { ServiceDescriptionFormatExtensionCollection extensions = ExtensionManager.GetExtensionPoint(ob); if (extensions != null) { foreach (object o in extensions) { if (o is ServiceDescriptionFormatExtension) { WriteExtension(writer, (ServiceDescriptionFormatExtension)o); } else if (o is XmlElement) { ((XmlElement)o).WriteTo(writer); } } } }
public void AddExtensionWarningComments(CodeCommentStatementCollection comments, ServiceDescriptionFormatExtensionCollection extensions) { foreach (object obj2 in extensions) { if (!extensions.IsHandled(obj2)) { string localName = null; string namespaceURI = null; if (obj2 is XmlElement) { XmlElement element = (XmlElement) obj2; localName = element.LocalName; namespaceURI = element.NamespaceURI; } else if (obj2 is ServiceDescriptionFormatExtension) { XmlFormatExtensionAttribute[] customAttributes = (XmlFormatExtensionAttribute[]) obj2.GetType().GetCustomAttributes(typeof(XmlFormatExtensionAttribute), false); if (customAttributes.Length > 0) { localName = customAttributes[0].ElementName; namespaceURI = customAttributes[0].Namespace; } } if (localName != null) { if (extensions.IsRequired(obj2)) { this.warnings |= ServiceDescriptionImportWarnings.RequiredExtensionsIgnored; AddWarningComment(comments, System.Web.Services.Res.GetString("WebServiceDescriptionIgnoredRequired", new object[] { localName, namespaceURI })); } else { this.warnings |= ServiceDescriptionImportWarnings.OptionalExtensionsIgnored; AddWarningComment(comments, System.Web.Services.Res.GetString("WebServiceDescriptionIgnoredOptional", new object[] { localName, namespaceURI })); } } } } }
public OutputBinding () { extensions = new ServiceDescriptionFormatExtensionCollection (this); }
public ServiceDescription () { bindings = new BindingCollection (this); extensions = new ServiceDescriptionFormatExtensionCollection (this); imports = new ImportCollection (this); messages = new MessageCollection (this); #if !NET_2_0 // name = String.Empty; #endif portTypes = new PortTypeCollection (this); serviceDescriptions = null; services = new ServiceCollection (this); targetNamespace = null; types = new Types (); }
void AddExtensionNamespaces (XmlSerializerNamespaces ns, ServiceDescriptionFormatExtensionCollection extensions) { foreach (object o in extensions) { ServiceDescriptionFormatExtension ext = o as ServiceDescriptionFormatExtension; if (ext == null) // o can be XmlElement, skipping that continue; ExtensionInfo einf = ExtensionManager.GetFormatExtensionInfo (ext.GetType ()); foreach (XmlQualifiedName qname in einf.NamespaceDeclarations) ns.Add (qname.Name, qname.Namespace); } }
static void CheckExtensions(ConformanceCheckContext ctx, ConformanceChecker checker, ServiceDescriptionFormatExtensionCollection extensions) { foreach (object o in extensions) { ServiceDescriptionFormatExtension ext = o as ServiceDescriptionFormatExtension; if (ext != null) { checker.Check(ctx, ext); } } }
public MimePart () { extensions = new ServiceDescriptionFormatExtensionCollection (this); }
public OperationFault () { extensions = new ServiceDescriptionFormatExtensionCollection (this); }
/// <include file='doc\ProtocolImporter.uex' path='docs/doc[@for="ProtocolImporter.AddExtensionWarningComments"]/*' /> /// <devdoc> /// <para>[To be supplied.]</para> /// </devdoc> public void AddExtensionWarningComments(CodeCommentStatementCollection comments, ServiceDescriptionFormatExtensionCollection extensions) { foreach (object item in extensions) { if (!extensions.IsHandled(item)) { string name = null; string ns = null; if (item is XmlElement) { XmlElement element = (XmlElement)item; name = element.LocalName; ns = element.NamespaceURI; } else if (item is ServiceDescriptionFormatExtension) { XmlFormatExtensionAttribute[] attrs = (XmlFormatExtensionAttribute[])item.GetType().GetCustomAttributes(typeof(XmlFormatExtensionAttribute), false); if (attrs.Length > 0) { name = attrs[0].ElementName; ns = attrs[0].Namespace; } } if (name != null) { if (extensions.IsRequired(item)) { warnings |= ServiceDescriptionImportWarnings.RequiredExtensionsIgnored; AddWarningComment(comments, Res.GetString(Res.WebServiceDescriptionIgnoredRequired, name, ns)); } else { warnings |= ServiceDescriptionImportWarnings.OptionalExtensionsIgnored; AddWarningComment(comments, Res.GetString(Res.WebServiceDescriptionIgnoredOptional, name, ns)); } } } } }
public void AddExtensionWarningComments(CodeCommentStatementCollection comments, ServiceDescriptionFormatExtensionCollection extensions) { throw new NotImplementedException(); }
public MimePart() { extensions = new ServiceDescriptionFormatExtensionCollection(this); }
public InputBinding() { extensions = new ServiceDescriptionFormatExtensionCollection(this); }
public Types() { extensions = new ServiceDescriptionFormatExtensionCollection(this); schemas = new XmlSchemas(); }
static void CheckExtensions (ConformanceCheckContext ctx, ConformanceChecker checker, ServiceDescriptionFormatExtensionCollection extensions) { foreach (ServiceDescriptionFormatExtension ext in extensions) checker.Check (ctx, ext); }
public Message () { extensions = new ServiceDescriptionFormatExtensionCollection (this); parts = new MessagePartCollection (this); serviceDescription = null; }
public Types () { extensions = new ServiceDescriptionFormatExtensionCollection (this); schemas = new XmlSchemas (); }
public Service () { extensions = new ServiceDescriptionFormatExtensionCollection (this); ports = new PortCollection (this); serviceDescription = null; }
public PortType () { operations = new OperationCollection (this); serviceDescription = null; extensions = new ServiceDescriptionFormatExtensionCollection (this); }