volume_up

A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

volume_up

A critical vulnerability was discovered in React Server Components (Next.js). Our systems remain protected but we advise to update packages to newest version. Learn More

EPiServer.Find.Api.Commands

Commands class implements EPiServer.Find.Api.ICommands interface and all implemented methods are virtual except few ones:

public class Commands : ICommands
{
    // Fields
    private ICache cache;
    private IJsonRequestFactory jsonRequestFactory;
    private Func serializerFactoryMethod;

    // Methods
    public Commands(string serverUrl, IJsonRequestFactory jsonRequestFactory, Func serializerFactoryMethod, ICache cache);
    public virtual BulkCommand Bulk(IEnumerable actions);
    public virtual CountCommand Count(SearchRequestBody searchRequestBody);
    public virtual CreateIndexCommand CreateIndex(string indexName);
    public virtual CreateIndexCommand CreateIndex(string indexName, CreateIndexBody requestBody);
    public virtual DeleteCommand Delete(string index, string type, string id);
    public virtual DeleteByQueryCommand DeleteByQuery();
    public DeleteIndexCommand DeleteIndex(string indexName);
    public virtual GetCommand Get(string index, string type, string id);
    private CommandContext GetCommandContext();
    public virtual IndexCommand Index(string index, string type, object document);
    public IndicesExistsCommand IndicesExists(string indexName);
    public virtual MultiGetCommand MultiGet(IndexName indexName, IEnumerable idAndTypes);
    public MultiSearchCommand MultiSearch();
    public virtual PutMappingCommand PutMapping(TypeMapping typeMapping);
    public virtual SearchCommand Search();
    public virtual UpdateCommand Update(IndexName index, TypeName type, DocumentId id);

    // Properties
    public string ServerUrl { get; private set; }
}

 

What is the reason to make for example

 public MultiSearchCommand MultiSearch();

method non-virtual?

I'm interesting due to the fact that I have to implement some custom "intercept" logic, use custom implementation of some commands (override Commands class methods) and left other unchanged.

#89213
Aug 11, 2014 14:47
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.