OperationMessageCollection.Add(OperationMessage) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
지정된 OperationMessage을 OperationMessageCollection 끝에 추가합니다.
public:
int Add(System::Web::Services::Description::OperationMessage ^ operationMessage);
public int Add (System.Web.Services.Description.OperationMessage operationMessage);
member this.Add : System.Web.Services.Description.OperationMessage -> int
Public Function Add (operationMessage As OperationMessage) As Integer
매개 변수
- operationMessage
- OperationMessage
컬렉션에 추가할 OperationMessage입니다.
반환
operationMessage
매개 변수가 추가된 위치의 인덱스(0부터 시작)입니다.
예제
// Get the operation message for the Add operation.
OperationMessage^ myOperationMessage = myOperationMessageCollection[ 0 ];
OperationMessage^ myInputOperationMessage = dynamic_cast<OperationMessage^>(gcnew OperationInput);
XmlQualifiedName^ myXmlQualifiedName = gcnew XmlQualifiedName( "AddSoapIn",myDescription->TargetNamespace );
myInputOperationMessage->Message = myXmlQualifiedName;
array<OperationMessage^>^myCollection = gcnew array<OperationMessage^>(myOperationMessageCollection->Count);
myOperationMessageCollection->CopyTo( myCollection, 0 );
Console::WriteLine( "Operation name(s) :" );
for ( int i = 0; i < myCollection->Length; i++ )
{
Console::WriteLine( " {0}", myCollection[ i ]->Operation->Name );
}
// Add the OperationMessage to the collection.
myOperationMessageCollection->Add( myInputOperationMessage );
// Get the operation message for the Add operation.
OperationMessage myOperationMessage =
myOperationMessageCollection[0];
OperationMessage myInputOperationMessage =
(OperationMessage) new OperationInput();
XmlQualifiedName myXmlQualifiedName = new XmlQualifiedName(
"AddSoapIn", myDescription.TargetNamespace);
myInputOperationMessage.Message = myXmlQualifiedName;
OperationMessage[] myCollection =
new OperationMessage[myOperationMessageCollection.Count];
myOperationMessageCollection.CopyTo(myCollection, 0);
Console.WriteLine("Operation name(s) :");
for (int i = 0; i < myCollection.Length ; i++)
{
Console.WriteLine(" " + myCollection[i].Operation.Name);
}
// Add the OperationMessage to the collection.
myOperationMessageCollection.Add(myInputOperationMessage);
' Get the operation message for the Add operation.
Dim myOperationMessage As OperationMessage = _
myOperationMessageCollection.Item(0)
Dim myInputOperationMessage As OperationMessage = _
CType(New OperationInput(), OperationMessage)
Dim myXmlQualifiedName As _
New XmlQualifiedName("AddSoapIn", myDescription.TargetNamespace)
myInputOperationMessage.Message = myXmlQualifiedName
Dim myCollection(myOperationMessageCollection.Count -1 ) _
As OperationMessage
myOperationMessageCollection.CopyTo(myCollection, 0)
Console.WriteLine("Operation name(s) :")
Dim i As Integer
For i = 0 To myCollection.Length - 1
Console.WriteLine(" " & myCollection(i).Operation.Name)
Next i
' Add the OperationMessage to the collection.
myOperationMessageCollection.Add(myInputOperationMessage)