public ThingChannelId(ThingId thingId, string channel)
 {
     SetSegment(SegmentIndex.Driver, thingId.Driver);
     SetSegment(SegmentIndex.Gateway, thingId.Gateway);
     SetSegment(SegmentIndex.Thing, thingId.Thing);
     SetSegment(SegmentIndex.Channel, channel);
 }
Beispiel #2
0
        public static bool TryParse(string id, out ThingId thingId)
        {
            var segments = id.Split(":");

            if (segments.Length != SegmentCount)
            {
                thingId = null;
                return(false);
            }

            thingId = new ThingId(segments);
            return(true);
        }