Share via


Session.EventRetentionMode Property

Gets or sets the EventRetentionMode object.

Namespace:  Microsoft.SqlServer.Management.XEvent
Assembly:  Microsoft.SqlServer.Management.XEvent (in Microsoft.SqlServer.Management.XEvent.dll)

Syntax

'Declaration
<SfcPropertyAttribute(Data := True)> _
Public Property EventRetentionMode As Session.EventRetentionModeEnum 
    Get 
    Set
'Usage
Dim instance As Session 
Dim value As Session.EventRetentionModeEnum 

value = instance.EventRetentionMode

instance.EventRetentionMode = value
[SfcPropertyAttribute(Data = true)]
public Session.EventRetentionModeEnum EventRetentionMode { get; set; }
[SfcPropertyAttribute(Data = true)]
public:
property Session.EventRetentionModeEnum EventRetentionMode {
    Session.EventRetentionModeEnum get ();
    void set (Session.EventRetentionModeEnum value);
}
[<SfcPropertyAttribute(Data = true)>]
member EventRetentionMode : Session.EventRetentionModeEnum with get, set
function get EventRetentionMode () : Session.EventRetentionModeEnum 
function set EventRetentionMode (value : Session.EventRetentionModeEnum)

Property Value

Type: Microsoft.SqlServer.Management.XEvent.Session.EventRetentionModeEnum
The EventRetentionMode object.

Exceptions

Exception Condition
XEventException

The EventRetentionMode is set to an unknown value.

See Also

Reference

Session Class

Microsoft.SqlServer.Management.XEvent Namespace