Пример #1
0
 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);
 }
Пример #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);
        }