Git Product home page Git Product logo

monitorfilesystem's People

Contributors

vcup avatar

Stargazers

 avatar

Watchers

 avatar

monitorfilesystem's Issues

about client project duelicate code issues

var guid = new Argument<string>
{
Name = "guid",
Description = "guid of Watcher"
};

var guid = new Argument<string>
{
Name = "guid"
};

var name = new Argument<string>
{
Name = "name",
Description = "name of watcher"
};
name.SetDefaultValue(string.Empty);

var name = new Argument<string?>
{
Name = "name"
};
name.SetDefaultValue(null);

有许多对象是基本重复的,可以在 Commands 文件夹建立一个 ShareItems,将重复对象放进去重复利用。另外还能设置统一的验证方法

About IOperate Design

public interface IOperate : IObserver<WatchingEventInfo>

IOperate 可以声明为带有专属 Argument 类型作为类型参数的接口,以便在需要参数的 Operate 中传入参数

private readonly string _destination;
public MoveOperate(string destination, ILogger<MoveOperate> logger) : base(logger)
{
_destination = destination;
}

File.Move(info.Path, _destination, true);

Directory.Move(info.Path, _destination);

about client project commands and arguments and option descriptions

public AddWatchCommand()
: base("add", "Create a watcher")

var path = new Argument<string>
{
Name = "path",
Description = "watching path",
};

GrpcAddress = new Option<string>(
"--address",
() => GrpcUnits.Settings.AddressString,
"address of GrpcService");
GrpcAddress.AddAlias("-d");

所有描述子命令、参数、选项的文本都是直接编码在代码中的,不利于查询修改以及本地化处理
应该建立类似语言文件、i18n 的机制将文本集中到一处

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.