Author: lluis
Date: 2005-04-11 05:37:04 -0400 (Mon, 11 Apr 2005)
New Revision: 42778
Modified:
trunk/mcs/class/System.Web.Services/System.Web.Services.Description/ChangeLog
trunk/mcs/class/System.Web.Services/System.Web.Services.Description/ServiceDescriptionCollection.cs
trunk/mcs/class/System.Web.Services/System.Web.Services.Description/ServiceDescriptionImporter.cs
Log:
2005-04-11 Lluis Sanchez Gual <[EMAIL PROTECTED]>
* ServiceDescriptionCollection.cs: Notify the parent importer
when a service description is added.
* ServiceDescriptionImporter.cs: Register wsdl docs added to the
collection.
Modified:
trunk/mcs/class/System.Web.Services/System.Web.Services.Description/ChangeLog
===================================================================
---
trunk/mcs/class/System.Web.Services/System.Web.Services.Description/ChangeLog
2005-04-11 09:32:47 UTC (rev 42777)
+++
trunk/mcs/class/System.Web.Services/System.Web.Services.Description/ChangeLog
2005-04-11 09:37:04 UTC (rev 42778)
@@ -1,3 +1,10 @@
+2005-04-11 Lluis Sanchez Gual <[EMAIL PROTECTED]>
+
+ * ServiceDescriptionCollection.cs: Notify the parent importer
+ when a service description is added.
+ * ServiceDescriptionImporter.cs: Register wsdl docs added to the
+ collection.
+
2005-02-07 Lluis Sanchez Gual <[EMAIL PROTECTED]>
* HttpSimpleProtocolImporter.cs: Fixed warning.
Modified:
trunk/mcs/class/System.Web.Services/System.Web.Services.Description/ServiceDescriptionCollection.cs
===================================================================
---
trunk/mcs/class/System.Web.Services/System.Web.Services.Description/ServiceDescriptionCollection.cs
2005-04-11 09:32:47 UTC (rev 42777)
+++
trunk/mcs/class/System.Web.Services/System.Web.Services.Description/ServiceDescriptionCollection.cs
2005-04-11 09:37:04 UTC (rev 42778)
@@ -34,7 +34,9 @@
namespace System.Web.Services.Description {
public sealed class ServiceDescriptionCollection :
ServiceDescriptionBaseCollection {
-
+
+ ServiceDescriptionImporter importer;
+
#region Constructors
public ServiceDescriptionCollection ()
@@ -64,14 +66,29 @@
#endregion // Properties
- #region Methods
+ #region Methods
+
+ internal void SetImporter (ServiceDescriptionImporter i)
+ {
+ importer = i;
+ }
public int Add (ServiceDescription serviceDescription)
- {
- Insert (Count, serviceDescription);
+ {
+ if (importer != null)
+ importer.OnServiceDescriptionAdded
(serviceDescription, null, null);
+ Insert (Count, serviceDescription);
return (Count - 1);
}
+ internal int Add (ServiceDescription serviceDescription, string
appSettingUrlKey, string appSettingBaseUrl)
+ {
+ if (importer != null)
+ importer.OnServiceDescriptionAdded
(serviceDescription, appSettingUrlKey, appSettingBaseUrl);
+ Insert (Count, serviceDescription);
+ return (Count - 1);
+ }
+
public bool Contains (ServiceDescription serviceDescription)
{
return List.Contains (serviceDescription);
Modified:
trunk/mcs/class/System.Web.Services/System.Web.Services.Description/ServiceDescriptionImporter.cs
===================================================================
---
trunk/mcs/class/System.Web.Services/System.Web.Services.Description/ServiceDescriptionImporter.cs
2005-04-11 09:32:47 UTC (rev 42777)
+++
trunk/mcs/class/System.Web.Services/System.Web.Services.Description/ServiceDescriptionImporter.cs
2005-04-11 09:37:04 UTC (rev 42778)
@@ -69,7 +69,8 @@
{
protocolName = String.Empty;
schemas = new XmlSchemas ();
- serviceDescriptions = new ServiceDescriptionCollection
();
+ serviceDescriptions = new ServiceDescriptionCollection
();
+ serviceDescriptions.SetImporter (this);
style = ServiceDescriptionImportStyle.Client;
}
@@ -123,10 +124,14 @@
{
if (appSettingUrlKey != null && appSettingUrlKey ==
string.Empty && style == ServiceDescriptionImportStyle.Server)
throw new InvalidOperationException ("Cannot
set appSettingUrlKey if Style is Server");
+
+ serviceDescriptions.Add (serviceDescription,
appSettingUrlKey, appSettingBaseUrl);
+ }
+ internal void OnServiceDescriptionAdded (ServiceDescription
serviceDescription, string appSettingUrlKey, string appSettingBaseUrl)
+ {
ImportInfo info = new ImportInfo (serviceDescription,
appSettingUrlKey, appSettingBaseUrl);
importInfo.Add (info);
- serviceDescriptions.Add (serviceDescription);
if (serviceDescription.Types != null)
schemas.Add (serviceDescription.Types.Schemas);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches