Session storage
Session storage ( id ) : Object
Parâmetro | Tipo | Descrição | |
---|---|---|---|
id | Text | → | Unique identifier (UUID) of the session |
Resultado | Object | ← | Storage object of the session |
História
Release | Mudanças |
---|---|
20 R8 | Support of standalone sessions |
20 R6 | Adicionado |
Descrição
The Session storage command returns the storage object of the session whose unique identifier you passed in the id parameter.
Em id, passe o UUID da sessão para a qual você deseja obter o armazenamento. It is automatically assigned by 4D (4D Server or, for standalone sessions, 4D single-user) and is stored in the .id property of the session object. Se a sessão não existir, o comando retornará Null.
Nota: você pode obter os identificadores de sessão usando o comando Process activity.
O objeto retornado é a propriedade .storage da sessão. It is a shared object used to store information available to all processes of the session. It is a shared object used to store information available to all processes of the session.
Exemplo
This method modifies the value of a "settings" property stored in the storage object of a specific session:
//Definir armazenamento para uma sessão
//A propriedade do método "Execute On Server" está definida
#DECLARE($id : Text; $text : Text)
var $obj : Object
$obj:=Session storage($id)
If($obj.settings=Null)
Use($obj)
$obj.settings:=New shared object("text";$text)
End use
Else
Use($obj.settings)
$obj.settings.text:=$text
End use
End if
Veja também
Propriedades
Número de comando | 1839 |
Thread safe | ✓ |