示例#1
0
        public static string ToUri(this IUSN usn)
        {
            switch (usn.EntityType)
            {
            case EntityType.Device:
                return($"uuid:{usn.DeviceUUID}");

            case EntityType.RootDevice:
                return($"uuid:{usn.DeviceUUID}::upnp:rootdevice");

            case EntityType.DeviceType:
            case EntityType.ServiceType:
            case EntityType.DomainDevice:
            case EntityType.DomainService:
                return($"uuid:{usn.DeviceUUID}::{EntityEx.ToUri(usn)}");

            default:
                throw new ArgumentOutOfRangeException();
            }
        }
示例#2
0
 public static string ToUri(this IST st)
 {
     return(EntityEx.ToUri(st));
 }