RequestLimits Class

Assembly: CodeEffects.Rule.Repository.dll
Namespace: CodeEffects.Rule.Repository

Summary

Holds the limits that every Rule Repository request is held to: the size of a request and of a stored payload, the number of filters, the number of lookup options, and the number of test runs under way at once.

Syntax

public class RequestLimits

Remarks

Set an instance on the Limits property of your IRepositoryConfiguration, for example on a Configuration object. When Limits is null, the repository uses the defaults listed below, which are also the values of a new RequestLimits. Raise a limit only when a refusal says that it was reached and the work is legitimate. A request is refused with the control number named in each property's description.

You supply the configuration on every request, so the limits can differ from one request to another.

Constructors

  • RequestLimits()

    Initializes a new instance of the RequestLimits class with the default values of all properties.

Properties

  • Filters

    Type: System.Int32

    Gets or sets the most filters that one repository request may carry. A request with more is refused with the control number CE10206. The default value is 50.

  • LookupOptions

    Type: System.Int32

    Gets or sets the most options that one lookup answers with. The default value is 1000.

  • PayloadLength

    Type: System.Int32

    Gets or sets the longest stored payload, in characters. It applies to a draft's rule, a rule's model, a test's values and run, and a value template. A longer payload is refused with the control number CE10207. The default value is 1048576 (1 MB).

  • RequestLength

    Type: System.Int32

    Gets or sets the longest request that the repository takes, in characters. A longer request is refused with the control number CE10205. The default value is 3145728 (3 MB).

    Remarks

    When the AI Assistant is available to the request (it has at least one model and AllowAttachments is true), the limit is raised if needed to make room for an attachment of the largest size that AssistantSettings.MaxAttachmentBytes allows, which arrives as base64 text.

  • TestRunsAtOnce

    Type: System.Int32

    Gets or sets the most test runs that may be under way at once in the process, for all users together. A run that would pass the limit does not start, and the test reports an error with the control number CE10209. A run that never returns keeps its place, so the limit also bounds the threads that such runs can take. The default value is 8.

    Example

      using CodeEffects.Rule.Repository;
    
      var configuration = new Configuration
      {
      	Limits = new RequestLimits { RequestLength = 6 * 1024 * 1024, Filters = 100, TestRunsAtOnce = 4 }
      };
    

Ask on Stack Overflow - Yes, it's still active
Ask in GitHub Discussions

p102

l097 --

l102

p101

×