AsnWriter.PushSetOf(Nullable<Asn1Tag>) 方法

定义

开始写入带有指定标记的 Set-Of。Begin writing a Set-Of with a specified tag.

public System.Formats.Asn1.AsnWriter.Scope PushSetOf (System.Formats.Asn1.Asn1Tag? tag = default);
member this.PushSetOf : Nullable<System.Formats.Asn1.Asn1Tag> -> System.Formats.Asn1.AsnWriter.Scope
Public Function PushSetOf (Optional tag As Nullable(Of Asn1Tag) = Nothing) As AsnWriter.Scope

参数

tag
Nullable<Asn1Tag>

要写入的标记,或将 null 用作默认标记(通用 17)。The tag to write, or null for the default tag (Universal 17).

返回

AsnWriter.Scope

将自动调用 PopSetOf(Nullable<Asn1Tag>) 的可释放值。A disposable value which will automatically call PopSetOf(Nullable<Asn1Tag>).

例外

tag.TagClasstag.TagClass Universal,但 tag.TagValueis Universal, but tag.TagValue 对于此方法而言是不正确的。is not correct for the method.

注解

CERDER 模式下,编写器会在标记关闭时对 Set-Of 元素进行排序。In CER and DER modes the writer will sort the Set-Of elements when the tag is closed.

适用于