GetMetadataCommand Constructor
GetMetadataCommand(Byte)
Initializes a new instance of the GetMetadataCommand class. This command takes the slot number as input.
public GetMetadataCommand(byte slotNumber)
Parameters
Type | Name | Description |
---|---|---|
System.Byte | slotNumber | The slot for which the metadata is requested. |
Remarks
The valid slot numbers are described in the User's Manual entry PIV slots. There is also the static class PivSlot providing mappings between slot names and numbers.
For example, the following two are equivalent.
var getMetadata = new GetMetadataCommand(0x9C);
var getMetadata = new GetMetadataCommand(PivSlot.Signing);
GetMetadataCommand()
Initializes a new instance of the GetMetadataCommand class.
public GetMetadataCommand()
Remarks
This constructor is provided for those developers who want to use the object initializer pattern. For example:
var getMetadataCommand = new GetMetadataCommand()
{
SlotNumber = PivSlot.Authentication,
};
There is no default slot number, hence, for this command to be valid, the slot number must be specified. So if you create an object using this constructor, you must set the SlotNumber property at some time before using it. Otherwise you will get an exception when you do use it.
The valid slot numbers are described in the User's Manual entry PIV slots. There is also the static class PivSlot providing mappings between slo/t names and numbers.