public static IAccessPoint Create(string ID) { if (string.IsNullOrWhiteSpace(ID)) { return(null); } ID = ID.Trim().ToLower(); if (ID.StartsWith("ws://") || ID.StartsWith("wss://")) { return(new RemoteAccessPointProxy(ID)); // right now, a WebSocket client } /* * else if (...) -> we could create WCF clients for Remote AccessPoints in future * based on the URL type * */ else { DeviceManager.Init(ID); var accPt = new AccessPoint(ID); s_LocalAccPts.Add(accPt); return(accPt); } }
public static IAccessPoint Create(string ID) { if (string.IsNullOrWhiteSpace (ID)) return null; ID = ID.Trim ().ToLower (); if (ID.StartsWith ("ws://") || ID.StartsWith ("wss://")) return new RemoteAccessPointProxy (ID); // right now, a WebSocket client /* * else if (...) -> we could create WCF clients for Remote AccessPoints in future * based on the URL type * */ else { DeviceManager.Init (ID); var accPt = new AccessPoint (ID); s_LocalAccPts.Add (accPt); return accPt; } }