次の方法で共有


ValueAsnReader.ReadEnumeratedValue メソッド

定義

オーバーロード

名前 説明
ReadEnumeratedValue(Type, Nullable<Asn1Tag>)

指定したタグを持つ列挙体として次の値を読み取り、FlagsAttributeで指定された [enumType] 以外の列挙型に変換します。

ReadEnumeratedValue<TEnum>(Nullable<Asn1Tag>)

指定したタグを持つ列挙体として次の値を読み取り、FlagsAttributeで指定された [TEnum] 以外の列挙型に変換します。

ReadEnumeratedValue(Type, Nullable<Asn1Tag>)

ソース:
AsnDecoder.Enumerated.cs

指定したタグを持つ列挙体として次の値を読み取り、FlagsAttributeで指定された [enumType] 以外の列挙型に変換します。

public Enum ReadEnumeratedValue(Type enumType, System.Formats.Asn1.Asn1Tag? expectedTag = default);
member this.ReadEnumeratedValue : Type * Nullable<System.Formats.Asn1.Asn1Tag> -> Enum
Public Function ReadEnumeratedValue (enumType As Type, Optional expectedTag As Nullable(Of Asn1Tag) = Nothing) As Enum

パラメーター

enumType
Type

変換先の型を表す Type オブジェクト。

expectedTag
Nullable<Asn1Tag>

読み取る前に確認するタグ、または既定のタグ (ユニバーサル 10) の null

返品

enumTypeに変換された列挙値。

例外

次の値に正しいタグがありません。

-又は-

現在のエンコード規則では、長さのエンコードは無効です。

-又は-

コンテンツは、現在のエンコード規則では無効です。

-又は-

エンコードされた値が大きすぎて、 enumType 値に収まりません。

enumType は列挙型ではありません。

 -or-

 <code data-dev-comment-type="paramref">enumType</code> was declared with <xref data-throw-if-not-resolved="true" uid="System.FlagsAttribute"></xref>.

 -or-

 <code data-dev-comment-type="paramref">expectedTag</code>.<xref data-throw-if-not-resolved="true" uid="System.Formats.Asn1.Asn1Tag.TagClass"></xref> is
 <xref data-throw-if-not-resolved="true" uid="System.Formats.Asn1.TagClass.Universal"></xref>, but
 <code data-dev-comment-type="paramref">expectedTag</code>.<xref data-throw-if-not-resolved="true" uid="System.Formats.Asn1.Asn1Tag.TagValue"></xref> is not correct for
 the method.

enumTypenullです。

注釈

このメソッドは、戻り値が enumType内で定義されていることを検証しません。

適用対象

ReadEnumeratedValue<TEnum>(Nullable<Asn1Tag>)

ソース:
AsnDecoder.Enumerated.cs

指定したタグを持つ列挙体として次の値を読み取り、FlagsAttributeで指定された [TEnum] 以外の列挙型に変換します。

public TEnum ReadEnumeratedValue<TEnum>(System.Formats.Asn1.Asn1Tag? expectedTag = default) where TEnum : Enum;
member this.ReadEnumeratedValue : Nullable<System.Formats.Asn1.Asn1Tag> -> 'Enum (requires 'Enum :> Enum)
Public Function ReadEnumeratedValue(Of TEnum As Enum) (Optional expectedTag As Nullable(Of Asn1Tag) = Nothing) As TEnum

型パラメーター

TEnum

変換先の列挙型。

パラメーター

expectedTag
Nullable<Asn1Tag>

読み取る前に確認するタグ、または既定のタグ (ユニバーサル 10) の null

返品

TEnum

TEnumに変換された列挙値。

例外

次の値に正しいタグがありません。

-又は-

現在のエンコード規則では、長さのエンコードは無効です。

-又は-

コンテンツは、現在のエンコード規則では無効です。

-又は-

エンコードされた値が大きすぎて、 TEnum 値に収まりません。

TEnum は列挙型ではありません。

 -or-

 <code data-dev-comment-type="typeparamref">TEnum</code> was declared with <xref data-throw-if-not-resolved="true" uid="System.FlagsAttribute"></xref>.

 -or-

 <code data-dev-comment-type="paramref">expectedTag</code>.<xref data-throw-if-not-resolved="true" uid="System.Formats.Asn1.Asn1Tag.TagClass"></xref> is
 <xref data-throw-if-not-resolved="true" uid="System.Formats.Asn1.TagClass.Universal"></xref>, but
 <code data-dev-comment-type="paramref">expectedTag</code>.<xref data-throw-if-not-resolved="true" uid="System.Formats.Asn1.Asn1Tag.TagValue"></xref> is not correct for
 the method.

注釈

このメソッドは、戻り値が TEnum内で定義されていることを検証しません。

適用対象