OperationCollection::Add Method (Operation^)
.NET Framework (current version)
Adds the specified Operation to the end of the OperationCollection.
Assembly: System.Web.Services (in System.Web.Services.dll)
Parameters
- operation
-
Type:
System.Web.Services.Description::Operation^
The Operation to add to the collection.
The following example demonstrates the use of the Add method.
OperationCollection^ myOperationCollection = myPortTypeCollection[ 0 ]->Operations; Operation^ myOperation = gcnew Operation; myOperation->Name = "Add"; OperationMessage^ myOperationMessageInput = (OperationMessage^)(gcnew OperationInput); myOperationMessageInput->Message = gcnew XmlQualifiedName( "AddSoapIn",myDescription->TargetNamespace ); OperationMessage^ myOperationMessageOutput = (OperationMessage^)(gcnew OperationOutput); myOperationMessageOutput->Message = gcnew XmlQualifiedName( "AddSoapOut",myDescription->TargetNamespace ); myOperation->Messages->Add( myOperationMessageInput ); myOperation->Messages->Add( myOperationMessageOutput ); myOperationCollection->Add( myOperation );
.NET Framework
Available since 1.1
Available since 1.1
Show: