Ejemplo n.º 1
0
 internal static UnifiNetworkDevice AsUnifiNetworkDevice(this JsonNetworkDevice deviceData)
 {
     return(new UnifiNetworkDevice
     {
         Name = deviceData.name
     });
 }
Ejemplo n.º 2
0
        public static IInfrastructureNetworkedDevice CreateFromJson(UniFiApi api, JsonNetworkDevice device)
        {
            switch (device.type)
            {
            case "uap":
                return(new AccessPointInfrastructureNetworkedDevice(api, device));

            case "usw":
                return(new SwitchInfrastructureNetworkedDevice(api, device));

            case "ugw":
                return(new RouterInfrastructureNetworkedDevice(api, device));

            default:
                return(new UnknownInfrastructureNetworkedDevice(api, device));
            }
        }
 public UnknownInfrastructureNetworkedDevice(UniFiApi api, JsonNetworkDevice json) : base(api, json)
 {
 }
 internal AccessPointInfrastructureNetworkedDevice(UniFiApi api, JsonNetworkDevice json) : base(api, json)
 {
 }
Ejemplo n.º 5
0
 protected IInfrastructureNetworkedDevice(UniFiApi api, JsonNetworkDevice json) : base(api)
 {
     Json    = json;
     Clients = new List <IClientNetworkedDevice>();
     InfrastructureDevices = new List <IInfrastructureNetworkedDevice>();
 }