Returns an Id if the passed string is in GUID format. A valid
string consists of optional whitespace, an optional left brace({), followed
by required 8 hexadecimal characters, a dash, 4 hexadecimal characters,
a dash, 4 hexadecimal characters, a dash, 4 hexadecimal characters, a dash,
and 12 hexadecimal characters, then finally an optional right brace(})
followed by whitespace. The braces must either both be present or both be omitted.
For example: {1234abcd-56ef-7a89-9fe8-7d65cd43ba21}
If the input string does not conform to this format, the
method returns null.
This method provides an alternative to calling
IsId(string) followed conditionally by new Id(string).
Namespace:
FileNet.Api.Util
Assembly:
FileNet.Api (in FileNet.Api.dll)
Visual Basic (Declaration) |
---|
Public Shared Function AsIdOrNull ( _
id As String _
) As Id |
C# |
---|
public static Id AsIdOrNull(
string id
) |
Visual C++ |
---|
public:
static Id^ AsIdOrNull(
String^ id
) |
JavaScript |
---|
FileNet.Api.Util.Id.asIdOrNull = function(id); |
Parameters
- id
- Type: System..::.String
A GUID value in string format from which to construct an ID.
Return Value
An
Id object or null.