Skip to content

Commit

Permalink
2002-08-15 Tim Coleman <tim@timcoleman.com>
Browse files Browse the repository at this point in the history
        * FaultBindingCollection.cs:
        * ImportCollection.cs:
        * MessageCollection.cs:
        * MessagePartCollection.cs:
        * OperationBindingCollection.cs:
        * OperationCollection.cs:
        * OperationFaultCollection.cs:
        * OperationMessageCollection.cs:
        * PortCollection.cs:
        * PortTypeCollection.cs:
        * ServiceCollection.cs:
        * ServiceDescriptionFormatExtensionCollection.cs:
                Use parent from ServiceDescriptionBaseCollection
        * ServiceDescriptionCollection.cs:
                Use parent from ServiceDescriptionBaseCollection
                Implement SetParent () method
        * ServiceDescriptionBaseCollection.cs:
                Add "parent" object.
                Add SetParent call to OnSet() and OnInsert ()

svn path=/trunk/mcs/; revision=6649
  • Loading branch information
Tim Coleman committed Aug 15, 2002
1 parent 1c829a1 commit d051a5f
Show file tree
Hide file tree
Showing 15 changed files with 44 additions and 108 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,24 @@
2002-08-15 Tim Coleman <tim@timcoleman.com>
* FaultBindingCollection.cs:
* ImportCollection.cs:
* MessageCollection.cs:
* MessagePartCollection.cs:
* OperationBindingCollection.cs:
* OperationCollection.cs:
* OperationFaultCollection.cs:
* OperationMessageCollection.cs:
* PortCollection.cs:
* PortTypeCollection.cs:
* ServiceCollection.cs:
* ServiceDescriptionFormatExtensionCollection.cs:
Use parent from ServiceDescriptionBaseCollection
* ServiceDescriptionCollection.cs:
Use parent from ServiceDescriptionBaseCollection
Implement SetParent () method
* ServiceDescriptionBaseCollection.cs:
Add "parent" object.
Add SetParent call to OnSet() and OnInsert ()

2002-08-12 Tim Coleman <tim@timcoleman.com>
* Operation.cs:
Fix ParameterOrderString in case ParameterOrder is
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,11 @@
namespace System.Web.Services.Description {
public sealed class FaultBindingCollection : ServiceDescriptionBaseCollection {

#region Fields

OperationBinding operationBinding;

#endregion // Fields

#region Constructors

internal FaultBindingCollection (OperationBinding operationBinding)
{
this.operationBinding = operationBinding;
parent = operationBinding;
}

#endregion // Constructors
Expand Down Expand Up @@ -75,7 +69,6 @@ public int IndexOf (FaultBinding bindingOperationFault)

public void Insert (int index, FaultBinding bindingOperationFault)
{
SetParent (bindingOperationFault, operationBinding);
List.Insert (index, bindingOperationFault);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,11 @@
namespace System.Web.Services.Description {
public sealed class ImportCollection : ServiceDescriptionBaseCollection {

#region Fields

ServiceDescription serviceDescription;

#endregion

#region Constructors

internal ImportCollection (ServiceDescription serviceDescription)
{
this.serviceDescription = serviceDescription;
parent = serviceDescription;
}

#endregion
Expand Down Expand Up @@ -63,7 +57,6 @@ public int IndexOf (Import import)

public void Insert (int index, Import import)
{
SetParent (import, serviceDescription);
List.Insert (index, import);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,11 @@
namespace System.Web.Services.Description {
public sealed class MessageCollection : ServiceDescriptionBaseCollection {

#region Fields

ServiceDescription serviceDescription;

#endregion // Fields

#region Constructors

internal MessageCollection (ServiceDescription serviceDescription)
{
this.serviceDescription = serviceDescription;
parent = serviceDescription;
}

#endregion
Expand Down Expand Up @@ -76,7 +70,6 @@ public int IndexOf (Message message)

public void Insert (int index, Message message)
{
SetParent (message, serviceDescription);
List.Insert (index, message);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,11 @@
namespace System.Web.Services.Description {
public sealed class MessagePartCollection : ServiceDescriptionBaseCollection {

#region Fields

Message message;

#endregion // Fields

#region Constructors

internal MessagePartCollection (Message message)
{
this.message = message;
parent = message;
}

#endregion
Expand Down Expand Up @@ -74,7 +68,6 @@ public int IndexOf (MessagePart messagePart)

public void Insert (int index, MessagePart messagePart)
{
SetParent (messagePart, message);
List.Insert (index, messagePart);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,11 @@
namespace System.Web.Services.Description {
public sealed class OperationBindingCollection : ServiceDescriptionBaseCollection {

#region Fields

Binding binding;

#endregion // Fields

#region Constructors

internal OperationBindingCollection (Binding binding)
{
this.binding = binding;
parent = binding;
}

#endregion // Constructors
Expand Down Expand Up @@ -63,7 +57,6 @@ public int IndexOf (OperationBinding bindingOperation)

public void Insert (int index, OperationBinding bindingOperation)
{
SetParent (bindingOperation, binding);
List.Insert (index, bindingOperation);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,11 @@
namespace System.Web.Services.Description {
public sealed class OperationCollection : ServiceDescriptionBaseCollection {

#region Fields

PortType portType;

#endregion // Fields

#region Constructors

internal OperationCollection (PortType portType)
{
this.portType = portType;
parent = portType;
}

#endregion // Constructors
Expand Down Expand Up @@ -63,7 +57,6 @@ public int IndexOf (Operation operation)

public void Insert (int index, Operation operation)
{
SetParent (operation, portType);
List.Insert (index, operation);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,11 @@
namespace System.Web.Services.Description {
public sealed class OperationFaultCollection : ServiceDescriptionBaseCollection {

#region Fields

Operation operation;

#endregion // Fields

#region Constructors

internal OperationFaultCollection (Operation operation)
{
this.operation = operation;
parent = operation;
}

#endregion // Constructors
Expand Down Expand Up @@ -75,8 +69,7 @@ public int IndexOf (OperationFault operationFaultMessage)

public void Insert (int index, OperationFault operationFaultMessage)
{
SetParent (operationFaultMessage, operation);
List.Insert (index, operation);
List.Insert (index, operationFaultMessage);
}

public void Remove (OperationFault operationFaultMessage)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,11 @@
namespace System.Web.Services.Description {
public sealed class OperationMessageCollection : ServiceDescriptionBaseCollection {

#region Fields

Operation operation;

#endregion // Fields

#region Constructors

internal OperationMessageCollection (Operation operation)
{
this.operation = operation;
parent = operation;
}

#endregion // Constructors
Expand Down Expand Up @@ -100,7 +94,6 @@ public int IndexOf (OperationMessage operationMessage)

public void Insert (int index, OperationMessage operationMessage)
{
SetParent (operationMessage, operation);
List.Insert (index, operationMessage);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,11 @@
namespace System.Web.Services.Description {
public sealed class PortCollection : ServiceDescriptionBaseCollection {

#region Fields

Service service;

#endregion // Fields

#region Constructors

internal PortCollection (Service service)
{
this.service = service;
parent = service;
}

#endregion
Expand Down Expand Up @@ -76,7 +70,6 @@ public int IndexOf (Port port)

public void Insert (int index, Port port)
{
SetParent (port, service);
List.Insert (index, port);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,11 @@
namespace System.Web.Services.Description {
public sealed class PortTypeCollection : ServiceDescriptionBaseCollection {

#region Fields

ServiceDescription serviceDescription;

#endregion // Fields

#region Constructors

internal PortTypeCollection (ServiceDescription serviceDescription)
{
this.serviceDescription = serviceDescription;
parent = serviceDescription;
}

#endregion // Constructors
Expand Down Expand Up @@ -75,7 +69,6 @@ public int IndexOf (PortType portType)

public void Insert (int index, PortType portType)
{
SetParent (portType, serviceDescription);
List.Insert (index, portType);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,11 @@
namespace System.Web.Services.Description {
public sealed class ServiceCollection : ServiceDescriptionBaseCollection {

#region Fields

ServiceDescription serviceDescription;

#endregion // Fields

#region Constructors

internal ServiceCollection (ServiceDescription serviceDescription)
{
this.serviceDescription = serviceDescription;
parent = serviceDescription;
}

#endregion // Constructors
Expand Down Expand Up @@ -78,7 +72,6 @@ public int IndexOf (Service service)

public void Insert (int index, Service service)
{
SetParent (service, serviceDescription);
List.Insert (index, service);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ public abstract class ServiceDescriptionBaseCollection : CollectionBase {
#region Fields

Hashtable table = new Hashtable ();
protected internal object parent;

#endregion // Fields

Expand All @@ -31,7 +32,7 @@ protected virtual IDictionary Table {

protected virtual string GetKey (object value)
{
return null; // per .NET documentation
return null;
}

protected override void OnClear ()
Expand All @@ -43,6 +44,7 @@ protected override void OnInsertComplete (int index, object value)
{
if (GetKey (value) != null)
Table [GetKey (value)] = value;
SetParent (value, parent);
}

protected override void OnRemove (int index, object value)
Expand All @@ -57,6 +59,7 @@ protected override void OnSet (int index, object oldValue, object newValue)
Table.Remove (GetKey (oldValue));
if (GetKey (newValue) != null)
Table [GetKey (newValue)] = newValue;
SetParent (newValue, parent);
}

protected virtual void SetParent (object value, object parent)
Expand Down
Loading

0 comments on commit d051a5f

Please sign in to comment.