コード例 #1
0
        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);
        }
コード例 #2
0
        /// <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);
        }