OidExtensionsFormat Method |
Formats current OID instance to textual representation.
Namespace:
SysadminsLV.PKI.Utils.CLRExtensions
Assembly:
SysadminsLV.PKI (in SysadminsLV.PKI.dll) Version: 3.7.0.0 (3.7.0.0)
Syntax public static string Format(
this Oid oid,
bool fullValue
)
<ExtensionAttribute>
Public Shared Function Format (
oid As Oid,
fullValue As Boolean
) As String
public:
[ExtensionAttribute]
static String^ Format(
Oid^ oid,
bool fullValue
)
[<ExtensionAttribute>]
static member Format :
oid : Oid *
fullValue : bool -> string
Parameters
- oid
- Type: System.Security.CryptographyOid
Oid object to format. - fullValue
- Type: SystemBoolean
Indicates whether to format both, OID friendly name and OID value.
Return Value
Type:
StringFormatted OID value.
Usage Note
In Visual Basic and C#, you can call this method as an instance method on any object of type
Oid. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
Remarks
Depending on OID value and parameters, OID object can be encoded differently.
If fullValue is set to False and FriendlyName
is not null, OID friendly name is returned, otherwise returns Value.
If fullValue is set to True and FriendlyName
is not null, method returns both, OID friendly name and value, otherwise returns Value.
Examples Examples:
Oid oid = new Oid("1.2.3.4.5");
oid.Format(false);
oid.Format(true);
oid = new Oid("1.3.14.3.2.26");
oid.Format(false);
oid.Format(true);
See Also