Uploaded image for project: 'Couchbase .NET client library'
  1. Couchbase .NET client library
  2. NCBC-2682

Implement common pattern for setting operation services

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Fixed
    • Major
    • 3.0.7
    • 3.0.6
    • library
    • None
    • 1

    Description

      The current approach to injecting operation services only applies to one service, the ITypeTranscoder. This service is manually set on the operation whenever an operation is constructed.

      While this is okay for a single service, as more services are required by the operation it will get out of hand and the margin for error will increase. The number of services injected into CouchbaseCollection is also getting high, which is a sign of code smell. These issues should probably be mitigated before adding compression related services.

      This can be addressed by defining a specific service with a narrow scope specifically designed to apply configuration such as services to operations. Common interfaces for various key/value options classes may be used to still allow customization on a per-operation basis.

      Attachments

        Activity

          People

            btburnett3 Brant Burnett
            btburnett3 Brant Burnett
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              PagerDuty