ObjectIdentifier.cs 798 B

12345678910111213141516171819202122232425262728
  1. using System;
  2. namespace Renci.SshNet.Common
  3. {
  4. /// <summary>
  5. /// Describes object identifier for DER encoding
  6. /// </summary>
  7. public struct ObjectIdentifier
  8. {
  9. /// <summary>
  10. /// Gets the object identifier.
  11. /// </summary>
  12. public ulong[] Identifiers { get; private set; }
  13. /// <summary>
  14. /// Initializes a new instance of the <see cref="ObjectIdentifier"/> class.
  15. /// </summary>
  16. /// <param name="identifiers">The identifiers.</param>
  17. public ObjectIdentifier(params ulong[] identifiers)
  18. : this()
  19. {
  20. if (identifiers.Length < 2)
  21. throw new ArgumentException("identifiers");
  22. this.Identifiers = identifiers;
  23. }
  24. }
  25. }