public IFilterOperationConventionDescriptor Operation(int operation) { FilterOperationConventionDescriptor?descriptor = Operations.FirstOrDefault( x => x.Definition.Operation == operation); if (descriptor is null) { descriptor = new FilterOperationConventionDescriptor(operation); Operations.Add(descriptor); } return(descriptor); }
/// <inheritdoc /> public IFilterOperationConventionDescriptor Operation(int operationId) { if (_operations.TryGetValue( operationId, out FilterOperationConventionDescriptor? descriptor)) { return(descriptor); } descriptor = FilterOperationConventionDescriptor.New(operationId); _operations.Add(operationId, descriptor); return(descriptor); }