Bewerken

MessageCollection Class

Definition

Represents a collection of instances of the Message class. This class cannot be inherited.

public ref class MessageCollection sealed : System::Web::Services::Description::ServiceDescriptionBaseCollection
public sealed class MessageCollection : System.Web.Services.Description.ServiceDescriptionBaseCollection
type MessageCollection = class
    inherit ServiceDescriptionBaseCollection
Public NotInheritable Class MessageCollection
Inherits ServiceDescriptionBaseCollection
Inheritance

Examples

ServiceDescription^ myServiceDescription = ServiceDescription::Read( "MathService_input_cpp.wsdl" );
// Create SOAP messages.
Message^ myMessage = gcnew Message;
myMessage->Name = "AddSoapOut";
MessagePart^ myMessagePart = gcnew MessagePart;
myMessagePart->Name = "parameters";
myMessagePart->Element = gcnew XmlQualifiedName( "AddResponse",myServiceDescription->TargetNamespace );
myMessage->Parts->Add( myMessagePart );
myServiceDescription->Messages->Add( myMessage );
ServiceDescription myServiceDescription =
   ServiceDescription.Read("MathService_input_cs.wsdl");

// Create SOAP messages.
Message myMessage = new Message();
myMessage.Name = "AddSoapOut";
MessagePart myMessagePart = new MessagePart();
myMessagePart.Name = "parameters";
myMessagePart.Element = new
   XmlQualifiedName("AddResponse",myServiceDescription.TargetNamespace);
myMessage.Parts.Add(myMessagePart);
myServiceDescription.Messages.Add(myMessage);
Dim myServiceDescription As ServiceDescription = _
   ServiceDescription.Read ("MathService_input_vb.wsdl")

' Create SOAP messages.
Dim myMessage As New Message()
myMessage.Name = "AddSoapOut"
Dim myMessagePart As New MessagePart()
myMessagePart.Name = "parameters"
myMessagePart.Element = New XmlQualifiedName("AddResponse", _
   myServiceDescription.TargetNamespace)
myMessage.Parts.Add(myMessagePart)
myServiceDescription.Messages.Add(myMessage)

Properties

Name Description
Item[Int32]

Gets or sets the value of a Message at the specified zero-based index.

Item[String]

Gets a Message specified by its name.

Table

Gets an interface that implements the association of the keys and values in the ServiceDescriptionBaseCollection.

(Inherited from ServiceDescriptionBaseCollection)

Methods

Name Description
Add(Message)

Adds the specified Message to the end of the MessageCollection.

Contains(Message)

Returns a value indicating whether the specified Message is a member of the MessageCollection.

CopyTo(Message[], Int32)

Copies the entire MessageCollection to a compatible one-dimensional array of type Message, starting at the specified zero-based index of the target array.

GetKey(Object)

Returns the name of the key associated with the value passed by reference.

(Inherited from ServiceDescriptionBaseCollection)
IndexOf(Message)

Searches for the specified Message and returns the zero-based index of the first occurrence within the collection.

Insert(Int32, Message)

Adds the specified Message to the MessageCollection at the specified zero-based index.

OnClear()

Clears the contents of the ServiceDescriptionBaseCollection instance.

(Inherited from ServiceDescriptionBaseCollection)
OnInsertComplete(Int32, Object)

Performs additional custom processes after inserting a new element into the ServiceDescriptionBaseCollection.

(Inherited from ServiceDescriptionBaseCollection)
OnRemove(Int32, Object)

Removes an element from the ServiceDescriptionBaseCollection.

(Inherited from ServiceDescriptionBaseCollection)
OnSet(Int32, Object, Object)

Replaces one value with another within the ServiceDescriptionBaseCollection.

(Inherited from ServiceDescriptionBaseCollection)
Remove(Message)

Removes the first occurrence of the specified Message from the MessageCollection.

SetParent(Object, Object)

Sets the parent object of the ServiceDescriptionBaseCollection instance.

(Inherited from ServiceDescriptionBaseCollection)

Applies to