/
DeviceLocationEventArgs.cs
47 lines (40 loc) · 1.24 KB
/
DeviceLocationEventArgs.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
using System;
using System.Collections.Generic;
using System.Text;
using System.Net;
namespace Waher.Networking.UPnP
{
/// <summary>
/// UPnP Device Location event handler.
/// </summary>
/// <param name="Sender">Sender of event.</param>
/// <param name="e">Event arguments.</param>
public delegate void UPnPDeviceLocationEventHandler(object Sender, DeviceLocationEventArgs e);
/// <summary>
/// Event arguments for completion events when downloading device description documents.
/// </summary>
public class DeviceLocationEventArgs
{
private readonly DeviceLocation location;
private readonly IPEndPoint localEndPoint;
private readonly IPEndPoint remoteEndPoint;
internal DeviceLocationEventArgs(DeviceLocation Location, IPEndPoint LocalEndPoint, IPEndPoint RemoteEndPoint)
{
this.location = Location;
this.localEndPoint = LocalEndPoint;
this.remoteEndPoint = RemoteEndPoint;
}
/// <summary>
/// Device Location information.
/// </summary>
public DeviceLocation Location => this.location;
/// <summary>
/// Local End Point
/// </summary>
public IPEndPoint LocalEndPoint => this.localEndPoint;
/// <summary>
/// Remote End Point
/// </summary>
public IPEndPoint RemoteEndPoint => this.remoteEndPoint;
}
}