ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Core.CIM Namespace / FeatureExpirationMethod Enumeration
Example Example

In This Topic
    FeatureExpirationMethod Enumeration
    In This Topic
    Stream service feature expiration method.
    Syntax
    public enum FeatureExpirationMethod : System.Enum, System.IComparable, System.IConvertible, System.IFormattable  
    Public Enum FeatureExpirationMethod 
       Inherits System.Enum
       Implements System.IComparable, System.IConvertible, System.IFormattable 
    Members
    MemberDescription
    MaximumFeatureAge Features will expire after the specified time since the beginning of their lifetime.
    MaximumFeatureCount The oldest features will expire after a threshold number of features has been reached.
    Example
    Set the Maximum Count of Previous Observations to be Stored in Memory
    //Must be on QueuedTask
    //Set Expiration Method and Max Expiration Count
    if (streamLayer.GetExpirationMethod() != FeatureExpirationMethod.MaximumFeatureCount)
      streamLayer.SetExpirationMethod(FeatureExpirationMethod.MaximumFeatureCount);
    streamLayer.SetExpirationMaxCount(15);
    //FYI
    if (streamLayer.IsTrackAware)
    {
      //MaxCount is per track! otherwise for the entire layer
    }
    
    Set the Maximum Age of Previous Observations to be Stored in Memory
    //Must be on QueuedTask
    //Set Expiration Method and Max Expiration Age
    if (streamLayer.GetExpirationMethod() != FeatureExpirationMethod.MaximumFeatureAge)
      streamLayer.SetExpirationMethod(FeatureExpirationMethod.MaximumFeatureAge);
    //set to 12 hours (max is 24 hours)
    streamLayer.SetExpirationMaxAge(new TimeSpan(12,0,0));
    
    //FYI
    if (streamLayer.IsTrackAware)
    {
      //MaxAge is per track! otherwise for the entire layer
    }
    
    Inheritance Hierarchy

    System.Object
       System.ValueType
          System.Enum
             ArcGIS.Core.CIM.FeatureExpirationMethod

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also