IUPnPDeviceValidator.cs 1.1 KB

123456789101112131415161718192021222324252627
  1. using System;
  2. namespace Rssdp.Infrastructure
  3. {
  4. /// <summary>
  5. /// Interface for components that check an <see cref="SsdpDevice"/> object's properties meet the UPnP specification for a particular version.
  6. /// </summary>
  7. public interface IUpnpDeviceValidator
  8. {
  9. /// <summary>
  10. /// Returns an enumerable set of strings, each one being a description of an invalid property on the specified root device.
  11. /// </summary>
  12. /// <param name="device">The <see cref="SsdpRootDevice"/> to validate.</param>
  13. System.Collections.Generic.IEnumerable<string> GetValidationErrors(SsdpRootDevice device);
  14. /// <summary>
  15. /// Returns an enumerable set of strings, each one being a description of an invalid property on the specified device.
  16. /// </summary>
  17. /// <param name="device">The <see cref="SsdpDevice"/> to validate.</param>
  18. System.Collections.Generic.IEnumerable<string> GetValidationErrors(SsdpDevice device);
  19. /// <summary>
  20. /// Validates the specified device and throws an <see cref="System.InvalidOperationException"/> if there are any validation errors.
  21. /// </summary>
  22. void ThrowIfDeviceInvalid(SsdpDevice device);
  23. }
  24. }