GithubHelp home page GithubHelp logo

huier-huang / everythingsharp Goto Github PK

View Code? Open in Web Editor NEW

This project forked from riboe/everythingsharp

0.0 0.0 0.0 157 KB

A simple C# wrapper around the Everything SDK from Voidtools.

License: MIT License

C# 100.00%

everythingsharp's Introduction

EverythingSharp

A simple C# wrapper around the Everything SDK from Voidtools.

Requirements

Everything must be installed and running.

Usage

The preferred way to use EverythingSharp is to use the fluent API:

using (EverythingSearcher everything = new EverythingSearcher())
{
    IEnumerable<EverythingEntry> results = everything
        .SearchFor("Visual Studio")
        .OrderBy(Sort.NameAscending)
        .WithResultLimit(10)
        .WithOffset(0)
        .GetFields(RequestFlags.FullPathAndFileName | RequestFlags.RunCount)
        .Execute();
}

The calls to OrderBy, WithResultLimit, WithOffset, and GetFields are all optional. If omitted, the default values used when searching are:
OrderBy defaults to Sort.NameAscending.
WithResultLimit defaults to no limit.
WithOffset defaults to no offset.
GetFields defaults to RequestFlags.FullPathAndFileName.

There's an older way to search, which should be avoided, but is kept for backwards compabatility:

using(var everything = new Everything())
{
    var query = "Chrome";
    var maxResults = 10;
    var offset = 0;
    var sorting = Sort.SizeDescending;
    var fields = RequestFlags.FullPathAndFileName | RequestFlags.Size;
    
    var results = everything.Search(query, maxResults, offset, sorting, fields);   
}

everythingsharp's People

Contributors

riboe avatar tianmenglucky avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.