public string GetMap(string domainKey, bool useCompression) 
		{
			Hashtable parameters = new Hashtable() ;
			if (this.Context != null)
			{
				WebServiceCancelEventArgs e = new WebServiceCancelEventArgs(this.Url, "GetMap", domainKey, useCompression, parameters);
				this.Context.EventManager.OnCallingWebService(this, e);
				if (e.Cancel)
				{
					this.Context.LogManager.Warn(this, "Calling web service canceled by observer!", "Url: " + this.Url); // do not localize
					return "";
				}
				domainKey = e.DomainKey;
				useCompression = e.UseCompression;				
			}
 
			object[] results = this.Invoke("GetMap", new object[] {
																	  domainKey,
																	  useCompression});

			if (this.Context != null)
			{
				parameters["result"] = results[0];

				WebServiceEventArgs e2 = new WebServiceEventArgs(this.Url, "GetMap", domainKey, useCompression, parameters);

				this.Context.EventManager.OnCalledWebService(this, e2);

				results[0] = parameters["result"];			
			}

			return ((string)(results[0]));
		}
Пример #2
0
 public void OnCalledWebService(object sender, WebServiceEventArgs e)
 {
 }
		public string LoadObject(string type, string identity, string domainKey, bool useCompression) 
		{
			Hashtable parameters = new Hashtable() ;
			parameters["type"] = type;
			parameters["identity"] = identity;
			WebServiceCancelEventArgs e = new WebServiceCancelEventArgs(this.Url, "LoadObject", domainKey, useCompression, parameters);
			this.Context.EventManager.OnCallingWebService(this, e);
			if (e.Cancel)
			{
				this.Context.LogManager.Warn(this, "Calling web service canceled by observer!", "Url: " + this.Url); // do not localize
				return "";
			}
			domainKey = e.DomainKey;
			useCompression = e.UseCompression;
			type = (string) parameters["type"];
			identity = (string) parameters["identity"];

			object[] results = this.Invoke("LoadObject", new object[] {
																		  type,
																		  identity,
																		  domainKey,
																		  useCompression});

			parameters["result"] = results[0];

			WebServiceEventArgs e2 = new WebServiceEventArgs(this.Url, "LoadObject", domainKey, useCompression, parameters);

			this.Context.EventManager.OnCalledWebService(this, e2);

			results[0] = parameters["result"];

			return ((string)(results[0]));
		}
		public string LoadProperty(string obj, string propertyName, string domainKey, bool useCompression) 
		{

			
			Hashtable parameters = new Hashtable() ;
			parameters["obj"] = obj;
			parameters["propertyName"] = propertyName;
			WebServiceCancelEventArgs e = new WebServiceCancelEventArgs(this.Url, "LoadProperty", domainKey, useCompression, parameters);
			this.Context.EventManager.OnCallingWebService(this, e);
			if (e.Cancel)
			{
				this.Context.LogManager.Warn(this, "Calling web service canceled by observer!", "Url: " + this.Url); // do not localize
				return "";
			}
			domainKey = e.DomainKey;
			useCompression = e.UseCompression;
			obj = (string) parameters["obj"];
			propertyName = (string) parameters["propertyName"];

			object[] results = this.Invoke("LoadProperty", new object[] {
																			obj,
																			propertyName,
																			domainKey,
																			useCompression});

			parameters["result"] = results[0];

			WebServiceEventArgs e2 = new WebServiceEventArgs(this.Url, "LoadProperty", domainKey, useCompression, parameters);

			this.Context.EventManager.OnCalledWebService(this, e2);

			results[0] = parameters["result"];

			return ((string)(results[0]));
		}
Пример #5
0
		public virtual void OnCalledWebService(object sender, WebServiceEventArgs e)
		{
			if (!(m_RaiseEvents))
			{
				return;
			}
			if (!(m_RaiseAfterEvents))
			{
				return;
			}
			if (!(m_RaiseWebServiceEvents))
			{
				return;
			}
			foreach (IObserver observer in m_Observers)
			{
				observer.OnCalledWebService(sender, e);
			}
			foreach (IObserver observer in m_ContextObservers)
			{
				observer.OnCalledWebService(sender, e);
			}
			this.Observer.OnCalledWebService(sender, e);
		}