DiscoveryExceptionDictionary.Add(String, Exception) Metodo

Definizione

Aggiunge un oggetto Exception con una chiave di url all'oggetto DiscoveryExceptionDictionary.

public:
 void Add(System::String ^ url, Exception ^ value);
public void Add(string url, Exception value);
member this.Add : string * Exception -> unit
Public Sub Add (url As String, value As Exception)

Parametri

url
String

URL che ha causato un'eccezione durante l'individuazione dei servizi Web XML.

value
Exception

Oggetto che si è verificato durante l'individuazione Exception dei servizi Web XML.

Eccezioni

url è null.

Una voce con una chiave di url esiste già in DiscoveryExceptionDictionary.

Esempio

DiscoveryExceptionDictionary^ myNewExceptionDictionary = gcnew DiscoveryExceptionDictionary;

// Add an exception with the custom error message.
Exception^ myNewException = gcnew Exception( "The requested service is not available." );
myNewExceptionDictionary->Add( myUrlKey, myNewException );
myExceptionDictionary = myNewExceptionDictionary;
DiscoveryExceptionDictionary myNewExceptionDictionary =
                           new DiscoveryExceptionDictionary();
// Add an exception with the custom error message.
Exception myNewException =
     new Exception("The requested service is not available.");
myNewExceptionDictionary.Add(myUrlKey, myNewException);
myExceptionDictionary = myNewExceptionDictionary;
Dim myNewExceptionDictionary As New DiscoveryExceptionDictionary()
' Add an exception with the custom error message.
Dim myNewException As New Exception("The requested service is not available.")
myNewExceptionDictionary.Add(myUrlKey, myNewException)
myExceptionDictionary = myNewExceptionDictionary

Si applica a

Vedi anche