我正在寻找一些方法来获取所有继承通用抽象类的类,并对每个类执行一个方法.
在实现抽象方法以获得我想要的类实现时,我一直在遵循这个Change参数类型,类似于:
public abstract class AbstractRequest<TResponseData>
where TResponseData : IResponseData
{
public abstract void Search();
public abstract GoodData BindData(TResponseData data);
}
public interface IResponseData
{
}
public class AResponse : IResponseData
{
}
public class BResponse : IResponseData
{
}
public class A : AbstractRequest<AResponse>
{
public override void Search()
{
// get AResponse
// Call to BindData() with AResponse
}
public override GoodData BindData(AResponse data)
{
// Bind the data from AResponse to GoodData …Run Code Online (Sandbox Code Playgroud) 我有VSCode版本1.18.1,这在我的 Gruntfile.js
grunt.registerTask('release', 'Release process', function(target) {
...
}
Run Code Online (Sandbox Code Playgroud)
那target是我可以运行grunt release:one或grunt release:two.但是,我无法弄清楚如何使VSCode与one|two目标一起运行任务.
这是tasks.json使用自动检测到的Grunt任务创建的文件VSCode.
{
// See https://go.microsoft.com/fwlink/?LinkId=733558
// for the documentation about the tasks.json format
"version": "2.0.0",
"tasks": [
{
"type": "grunt",
"task": "release",
"problemMatcher": [],
"label": "Release Process",
"group": {
"kind": "build",
"isDefault": true
}
}
]
}
Run Code Online (Sandbox Code Playgroud)
如果我把文件release:one的task属性tasks.json,VSCode会抱怨类似的东西
Error: The grunt task detection didn't contribute a task for the following configuration:
Run Code Online (Sandbox Code Playgroud)
有人做过类似的事吗?你能指导我怎么做吗? …
我将 iTerm2 与连接到本地主机 Tmux 服务器的 Tmux 会话一起使用。在普通的 iTerm2 窗口/选项卡上,我可以使用Cmd + Click其默认应用程序打开文件。但是,它在 Tmux 会话中不起作用。iTerm2 始终在默认浏览器中以 URL 形式打开文件,而不是在其默认应用程序中打开文件。
有谁知道解决这个问题?或者我的 Tmux 配置有问题?