This documentation is archived and is not being maintained.

ServiceDescriptionImporter.ServiceDescriptions Property

Gets the ServiceDescriptionCollection being imported by the ServiceDescriptionImporter.

[Visual Basic]
Public ReadOnly Property ServiceDescriptions As _
   ServiceDescriptionCollection
[C#]
public ServiceDescriptionCollection ServiceDescriptions {get;}
[C++]
public: __property ServiceDescriptionCollection*
   get_ServiceDescriptions();
[JScript]
public function get ServiceDescriptions() :
   ServiceDescriptionCollection;

Property Value

A ServiceDescriptionCollection.

Remarks

Note   As with any collection that forms a read-only property, members can be added to the collection, removed from the collection, or modified using the methods exposed by the collection. However, it is recommended that the developer use the AddServiceDescription method to add members to this collection.

Example

[Visual Basic] 
Dim myImporter As New ServiceDescriptionImporter()
' Add the ServiceDescription to the ServiceDescriptionImporter.
myImporter.AddServiceDescription(myServiceDescription, "", "")
Dim myCollection As ServiceDescriptionCollection = _
                                    myImporter.ServiceDescriptions
Console.WriteLine("Style : " + myImporter.Style.ToString())
' Get the XMLSchema related to the ServiceDescriptionImporter.
Dim mySchemas As XmlSchemas = myImporter.Schemas

If myCollection.Contains(myServiceDescription) Then
   Console.WriteLine("ServiceDescription is available, TargetNamespace: " + _
                      myServiceDescription.TargetNamespace)
Else
   Console.WriteLine("ServiceDescription is not available")
End If

[C#] 
ServiceDescriptionImporter myImporter = new ServiceDescriptionImporter();
// Add the ServiceDescription to the ServiceDescriptionImporter.
myImporter.AddServiceDescription(myServiceDescription, "", "");
ServiceDescriptionCollection myCollection = 
                             myImporter.ServiceDescriptions;
Console.WriteLine("Style : " + myImporter.Style.ToString());
// Get the XMLSchema related to the ServiceDescriptionImporter.
XmlSchemas mySchemas = myImporter.Schemas;

if (myCollection.Contains(myServiceDescription))
   Console.WriteLine("ServiceDescription is available, TargetNamespace: "
      + myServiceDescription.TargetNamespace);
else
   Console.WriteLine("ServiceDescription is not available");

[C++] 
ServiceDescriptionImporter* myImporter = new ServiceDescriptionImporter();
// Add the ServiceDescription to the ServiceDescriptionImporter.
myImporter->AddServiceDescription(myServiceDescription, S"", S"");
ServiceDescriptionCollection* myCollection =
   myImporter->ServiceDescriptions;
Console::WriteLine(S"Style : {0}",__box( myImporter->Style));
// Get the XMLSchema related to the ServiceDescriptionImporter.
myImporter->Schemas;

if (myCollection->Contains(myServiceDescription))
   Console::WriteLine(S"ServiceDescription is available, TargetNamespace: {0}", myServiceDescription->TargetNamespace);
else
   Console::WriteLine(S"ServiceDescription is not available");

[JScript] No example is available for JScript. To view a Visual Basic, C#, or C++ example, click the Language Filter button Language Filter in the upper-left corner of the page.

Requirements

Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family

See Also

ServiceDescriptionImporter Class | ServiceDescriptionImporter Members | System.Web.Services.Description Namespace

Show: