DiscoveryExceptionDictionary.Add(String, Exception) DiscoveryExceptionDictionary.Add(String, Exception) DiscoveryExceptionDictionary.Add(String, Exception) DiscoveryExceptionDictionary.Add(String, Exception) Method

Определение

Добавляет Exception с ключом url к DiscoveryExceptionDictionary.Adds an Exception with a key of url to the 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)

Параметры

url
String String String String

URL-адрес, вызвавший исключение во время обнаружения веб-служб XML.The URL that caused an exception during XML Web services discovery.

value
Exception Exception Exception Exception

Исключение класса Exception, произошедшее во время обнаружения веб-служб XML.The Exception that occurred during XML Web services discovery.

Исключения

Запись с ключом url уже существует в DiscoveryExceptionDictionary.An entry with a key of url already exists in the DiscoveryExceptionDictionary.

Примеры

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

Применяется к

Дополнительно