Operation.Messages Propriedade
Definição
Importante
Algumas informações se referem a produtos de pré-lançamento que podem ser substancialmente modificados antes do lançamento. A Microsoft não oferece garantias, expressas ou implícitas, das informações aqui fornecidas.
public:
property System::Web::Services::Description::OperationMessageCollection ^ Messages { System::Web::Services::Description::OperationMessageCollection ^ get(); };
public System.Web.Services.Description.OperationMessageCollection Messages { get; }
member this.Messages : System.Web.Services.Description.OperationMessageCollection
Public ReadOnly Property Messages As OperationMessageCollection
Valor da propriedade
A coleção de instâncias da Message classe definida pelo atual Operation.
Exemplos
// Create an Operation.
Operation^ myOperation = gcnew Operation;
myOperation->Name = myOperationName;
OperationMessage^ myInput = dynamic_cast<OperationMessage^>(gcnew OperationInput);
myInput->Message = gcnew XmlQualifiedName( myInputMesg );
OperationMessage^ myOutput = dynamic_cast<OperationMessage^>(gcnew OperationOutput);
myOutput->Message = gcnew XmlQualifiedName( myOutputMesg );
// Add messages to the OperationMessageCollection.
myOperation->Messages->Add( myInput );
myOperation->Messages->Add( myOutput );
Console::WriteLine( "Operation name is: {0}", myOperation->Name );
// Create an Operation.
Operation myOperation = new Operation();
myOperation.Name = myOperationName;
OperationMessage myInput = (OperationMessage)new OperationInput();
myInput.Message = new XmlQualifiedName(myInputMesg);
OperationMessage myOutput = (OperationMessage)new OperationOutput();
myOutput.Message = new XmlQualifiedName(myOutputMesg);
// Add messages to the OperationMessageCollection.
myOperation.Messages.Add(myInput);
myOperation.Messages.Add(myOutput);
Console.WriteLine("Operation name is: " + myOperation.Name);
' Create an Operation.
Dim myOperation As New Operation()
myOperation.Name = myOperationName
Dim myInput As OperationMessage = _
CType(New OperationInput(), OperationMessage)
myInput.Message = New XmlQualifiedName(myInputMesg)
Dim myOutput As OperationMessage = _
CType(New OperationOutput(), OperationMessage)
myOutput.Message = New XmlQualifiedName(myOutputMesg)
' Add messages to the OperationMessageCollection.
myOperation.Messages.Add(myInput)
myOperation.Messages.Add(myOutput)
Console.WriteLine("Operation name is: " & myOperation.Name)
Comentários
Como uma Operation é associada a exatamente uma OperationInput e exatamente uma OperationOutput, apenas uma instância de cada uma pode ser um membro dessa coleção e, portanto, a coleção pode ter um máximo de dois membros.