public static bool TryParse(string id, out GatewayId gatewayId) { var segments = id.Split(":"); if (segments.Length != SegmentCount) { gatewayId = null; return(false); } gatewayId = new GatewayId(segments); return(true); }
public ThingId(GatewayId gatewayId, string thing) { SetSegment(SegmentIndex.Driver, gatewayId.Driver); SetSegment(SegmentIndex.Gateway, gatewayId.Gateway); SetSegment(SegmentIndex.Thing, thing); }