Beispiel #1
0
 /// <summary>
 /// Starts the retrieval of a Device Description Document.
 /// </summary>
 /// <param name="Callback">Callback method. Will be called when the document has been downloaded, or an error has occurred.</param>
 /// <param name="State">State object propagated to the callback method.</param>
 public void StartGetDevice(DeviceDescriptionEventHandler Callback, object State)
 {
     this.client.StartGetDevice(this.location, Callback, State);
 }
Beispiel #2
0
		/// <summary>
		/// Starts the retrieval of a Device Description Document.
		/// </summary>
		/// <param name="Location">URL of the Device Description Document.</param>
		/// <param name="Callback">Callback method. Will be called when the document has been downloaded, or an error has occurred.</param>
		/// <param name="State">State object propagated to the callback method.</param>
		public void StartGetDevice(string Location, DeviceDescriptionEventHandler Callback, object State)
		{
			Uri LocationUri = new Uri(Location);
			WebClient Client = new WebClient();
			Client.DownloadDataCompleted += new DownloadDataCompletedEventHandler(DownloadDeviceCompleted);
			Client.DownloadDataAsync(LocationUri, new object[] { Callback, Location, State });
		}
		/// <summary>
		/// Starts the retrieval of a Device Description Document.
		/// </summary>
		/// <param name="Callback">Callback method. Will be called when the document has been downloaded, or an error has occurred.</param>
		/// <param name="State">State object propagated to the callback method.</param>
		public void StartGetDevice(DeviceDescriptionEventHandler Callback, object State)
		{
			this.client.StartGetDevice(this.location, Callback, State);
		}