コード例 #1
0
        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);
        }
コード例 #2
0
 public ThingId(GatewayId gatewayId, string thing)
 {
     SetSegment(SegmentIndex.Driver, gatewayId.Driver);
     SetSegment(SegmentIndex.Gateway, gatewayId.Gateway);
     SetSegment(SegmentIndex.Thing, thing);
 }