This documentation is archived and is not being maintained.
ServiceDescriptionBaseCollection Class
Visual Studio 2010
Forms the basis for the strongly typed collections that are members of the System.Web.Services.Description namespace.
System::Object
System.Collections::CollectionBase
System.Web.Services.Description::ServiceDescriptionBaseCollection
More...
System.Collections::CollectionBase
System.Web.Services.Description::ServiceDescriptionBaseCollection
More...
Assembly: System.Web.Services (in System.Web.Services.dll)
The ServiceDescriptionBaseCollection type exposes the following members.
| Name | Description | |
|---|---|---|
![]() | Capacity | Gets or sets the number of elements that the CollectionBase can contain. (Inherited from CollectionBase.) |
![]() | Count | Gets the number of elements contained in the CollectionBase instance. This property cannot be overridden. (Inherited from CollectionBase.) |
![]() | InnerList | Gets an ArrayList containing the list of elements in the CollectionBase instance. (Inherited from CollectionBase.) |
![]() | List | Gets an IList containing the list of elements in the CollectionBase instance. (Inherited from CollectionBase.) |
![]() | Table | Gets an interface that implements the association of the keys and values in the ServiceDescriptionBaseCollection. |
| Name | Description | |
|---|---|---|
![]() | Clear | Removes all objects from the CollectionBase instance. This method cannot be overridden. (Inherited from CollectionBase.) |
![]() | Equals(Object) | Determines whether the specified Object is equal to the current Object. (Inherited from Object.) |
![]() | Finalize | Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (Inherited from Object.) |
![]() | GetEnumerator | Returns an enumerator that iterates through the CollectionBase instance. (Inherited from CollectionBase.) |
![]() | GetHashCode | Serves as a hash function for a particular type. (Inherited from Object.) |
![]() | GetKey | Returns the name of the key associated with the value passed by reference. |
![]() | GetType | Gets the Type of the current instance. (Inherited from Object.) |
![]() | MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) |
![]() | OnClear | Clears the contents of the ServiceDescriptionBaseCollection instance. (Overrides CollectionBase::OnClear().) |
![]() | OnClearComplete | Performs additional custom processes after clearing the contents of the CollectionBase instance. (Inherited from CollectionBase.) |
![]() | OnInsert | Performs additional custom processes before inserting a new element into the CollectionBase instance. (Inherited from CollectionBase.) |
![]() | OnInsertComplete | Performs additional custom processes after inserting a new element into the ServiceDescriptionBaseCollection. (Overrides CollectionBase::OnInsertComplete(Int32, Object).) |
![]() | OnRemove | Removes an element from the ServiceDescriptionBaseCollection. (Overrides CollectionBase::OnRemove(Int32, Object).) |
![]() | OnRemoveComplete | Performs additional custom processes after removing an element from the CollectionBase instance. (Inherited from CollectionBase.) |
![]() | OnSet | Replaces one value with another within the ServiceDescriptionBaseCollection. (Overrides CollectionBase::OnSet(Int32, Object, Object).) |
![]() | OnSetComplete | Performs additional custom processes after setting a value in the CollectionBase instance. (Inherited from CollectionBase.) |
![]() | OnValidate | Performs additional custom processes when validating a value. (Inherited from CollectionBase.) |
![]() | RemoveAt | Removes the element at the specified index of the CollectionBase instance. This method is not overridable. (Inherited from CollectionBase.) |
![]() | SetParent | Sets the parent object of the ServiceDescriptionBaseCollection instance. |
![]() | ToString | Returns a string that represents the current object. (Inherited from Object.) |
| Name | Description | |
|---|---|---|
![]() ![]() | ICollection::CopyTo | Copies the entire CollectionBase to a compatible one-dimensional Array, starting at the specified index of the target array. (Inherited from CollectionBase.) |
![]() ![]() | ICollection::IsSynchronized | Gets a value indicating whether access to the CollectionBase is synchronized (thread safe). (Inherited from CollectionBase.) |
![]() ![]() | ICollection::SyncRoot | Gets an object that can be used to synchronize access to the CollectionBase. (Inherited from CollectionBase.) |
![]() ![]() | IList::Add | Adds an object to the end of the CollectionBase. (Inherited from CollectionBase.) |
![]() ![]() | IList::Contains | Determines whether the CollectionBase contains a specific element. (Inherited from CollectionBase.) |
![]() ![]() | IList::IndexOf | Searches for the specified Object and returns the zero-based index of the first occurrence within the entire CollectionBase. (Inherited from CollectionBase.) |
![]() ![]() | IList::Insert | Inserts an element into the CollectionBase at the specified index. (Inherited from CollectionBase.) |
![]() ![]() | IList::IsFixedSize | Gets a value indicating whether the CollectionBase has a fixed size. (Inherited from CollectionBase.) |
![]() ![]() | IList::IsReadOnly | Gets a value indicating whether the CollectionBase is read-only. (Inherited from CollectionBase.) |
![]() ![]() | IList::Item | Gets or sets the element at the specified index. (Inherited from CollectionBase.) |
![]() ![]() | IList::Remove | Removes the first occurrence of a specific object from the CollectionBase. (Inherited from CollectionBase.) |
static void MyMethod( ServiceDescriptionBaseCollection^ myServiceCollection ) { Type^ myType = myServiceCollection->GetType(); if ( myType->Equals( System::Web::Services::Description::ServiceCollection::typeid ) ) { // Remove the services at index 0 of the collection. (dynamic_cast<ServiceCollection^>(myServiceCollection))->Remove( myServiceDescription->Services[ 0 ] ); // Build a new Service. Service^ myService = gcnew Service; myService->Name = "MathService"; XmlQualifiedName^ myXmlQualifiedName = gcnew XmlQualifiedName( "s0:MathServiceSoap" ); // Build a new Port for SOAP. Port^ mySoapPort = gcnew Port; mySoapPort->Name = "MathServiceSoap"; mySoapPort->Binding = myXmlQualifiedName; SoapAddressBinding^ mySoapAddressBinding = gcnew SoapAddressBinding; mySoapAddressBinding->Location = "http://localhost/" "ServiceDescriptionBaseCollection/AddSubtractService.CS.asmx"; mySoapPort->Extensions->Add( mySoapAddressBinding ); // Build a new Port for HTTP-GET. XmlQualifiedName^ myXmlQualifiedName2 = gcnew XmlQualifiedName( "s0:MathServiceHttpGet" ); Port^ myHttpGetPort = gcnew Port; myHttpGetPort->Name = "MathServiceHttpGet"; myHttpGetPort->Binding = myXmlQualifiedName2; HttpAddressBinding^ myHttpAddressBinding = gcnew HttpAddressBinding; myHttpAddressBinding->Location = "http://localhost/" "ServiceDescriptionBaseCollection/AddSubtractService.CS.asmx"; myHttpGetPort->Extensions->Add( myHttpAddressBinding ); // Add the ports to the Service. myService->Ports->Add( myHttpGetPort ); myService->Ports->Add( mySoapPort ); // Add the Service to the ServiceCollection. myServiceDescription->Services->Add( myService ); } else if ( myType->Equals( System::Web::Services::Description::BindingCollection::typeid ) ) { // Remove the Binding in the BindingCollection at index 0. (dynamic_cast<BindingCollection^>(myServiceCollection))->Remove( myServiceDescription->Bindings[ 0 ] ); // Build a new Binding. Binding^ myBinding = gcnew Binding; myBinding->Name = "MathServiceSoap"; XmlQualifiedName^ myXmlQualifiedName = gcnew XmlQualifiedName( "s0:MathServiceSoap" ); myBinding->Type = myXmlQualifiedName; SoapBinding^ mySoapBinding = gcnew SoapBinding; mySoapBinding->Transport = "http://schemas.xmlsoap.org/soap/http"; mySoapBinding->Style = SoapBindingStyle::Document; // Create the operations for the binding. OperationBinding^ addOperationBinding = CreateOperationBinding( "Add", myServiceDescription->TargetNamespace ); OperationBinding^ subtractOperationBinding = CreateOperationBinding( "Subtract", myServiceDescription->TargetNamespace ); // Add the operations to the Binding. myBinding->Operations->Add( subtractOperationBinding ); myBinding->Operations->Add( addOperationBinding ); myBinding->Extensions->Add( mySoapBinding ); // Add the Binding to the Bindings collection. myServiceDescription->Bindings->Add( myBinding ); } else if ( myType->Equals( System::Web::Services::Description::PortTypeCollection::typeid ) ) { // Remove the PortType at index 0. (dynamic_cast<PortTypeCollection^>(myServiceCollection))->Remove( myServiceDescription->PortTypes[ 0 ] ); // Build a new PortType. PortType^ myPortType = gcnew PortType; myPortType->Name = "MathServiceSoap"; // Build an Add Operation for the PortType. Operation^ myAddOperation = gcnew Operation; myAddOperation->Name = "Add"; // Build the Input and Output messages for the Operations. OperationInput^ myOperationInputMessage1 = gcnew OperationInput; XmlQualifiedName^ myXmlQualifiedName1 = gcnew XmlQualifiedName( "s0:AddSoapIn" ); myOperationInputMessage1->Message = myXmlQualifiedName1; OperationOutput^ myOperationOutputMessage1 = gcnew OperationOutput; XmlQualifiedName^ myXmlQualifiedName2 = gcnew XmlQualifiedName( "s0:AddSoapOut" ); myOperationOutputMessage1->Message = myXmlQualifiedName2; // Add the messages to the operations. myAddOperation->Messages->Add( myOperationInputMessage1 ); myAddOperation->Messages->Add( myOperationOutputMessage1 ); // Build an Add Operation for the PortType. Operation^ mySubtractOperation = gcnew Operation; mySubtractOperation->Name = "Subtract"; // Build the Input and Output messages for the operations. OperationInput^ myOperationInputMessage2 = gcnew OperationInput; XmlQualifiedName^ myXmlQualifiedName3 = gcnew XmlQualifiedName( "s0:SubtractSoapIn" ); myOperationInputMessage2->Message = myXmlQualifiedName3; OperationOutput^ myOperationOutputMessage2 = gcnew OperationOutput; XmlQualifiedName^ myXmlQualifiedName4 = gcnew XmlQualifiedName( "s0:SubtractSoapOut" ); myOperationOutputMessage2->Message = myXmlQualifiedName4; // Add the messages to the operations. mySubtractOperation->Messages->Add( myOperationInputMessage2 ); mySubtractOperation->Messages->Add( myOperationOutputMessage2 ); // Add the operations to the PortType. myPortType->Operations->Add( myAddOperation ); myPortType->Operations->Add( mySubtractOperation ); // Add the PortType to the collection. myServiceDescription->PortTypes->Add( myPortType ); } }
Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows XP SP2 x64 Edition, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
The .NET Framework does not support all versions of every platform. For a list of the supported versions, see .NET Framework System Requirements.
System::Object
System.Collections::CollectionBase
System.Web.Services.Description::ServiceDescriptionBaseCollection
System.Web.Services.Description::BindingCollection
System.Web.Services.Description::FaultBindingCollection
System.Web.Services.Description::ImportCollection
System.Web.Services.Description::MessageCollection
System.Web.Services.Description::MessagePartCollection
System.Web.Services.Description::OperationBindingCollection
System.Web.Services.Description::OperationCollection
System.Web.Services.Description::OperationFaultCollection
System.Web.Services.Description::OperationMessageCollection
System.Web.Services.Description::PortCollection
System.Web.Services.Description::PortTypeCollection
System.Web.Services.Description::ServiceCollection
System.Web.Services.Description::ServiceDescriptionCollection
System.Web.Services.Description::ServiceDescriptionFormatExtensionCollection
System.Collections::CollectionBase
System.Web.Services.Description::ServiceDescriptionBaseCollection
System.Web.Services.Description::BindingCollection
System.Web.Services.Description::FaultBindingCollection
System.Web.Services.Description::ImportCollection
System.Web.Services.Description::MessageCollection
System.Web.Services.Description::MessagePartCollection
System.Web.Services.Description::OperationBindingCollection
System.Web.Services.Description::OperationCollection
System.Web.Services.Description::OperationFaultCollection
System.Web.Services.Description::OperationMessageCollection
System.Web.Services.Description::PortCollection
System.Web.Services.Description::PortTypeCollection
System.Web.Services.Description::ServiceCollection
System.Web.Services.Description::ServiceDescriptionCollection
System.Web.Services.Description::ServiceDescriptionFormatExtensionCollection
Show:






