Operation.Messages Proprietà
Definizione
Importante
Alcune informazioni sono relative alla release non definitiva del prodotto, che potrebbe subire modifiche significative prima della release definitiva. Microsoft non riconosce alcuna garanzia, espressa o implicita, in merito alle informazioni qui fornite.
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
Valore della proprietà
Raccolta di istanze della classe Message definita dall'oggetto Operation corrente.
Esempio
// 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)
Commenti
Poiché un oggetto Operation è associato esattamente a uno OperationInput e esattamente OperationOutputuno , solo un'istanza di ogni raccolta può essere un membro di questa raccolta e quindi può avere un massimo di due membri.