小编Ser*_*giu的帖子

wpf mvvm具有非依赖属性?

我有一个小(我希望)的问题.我有一个wpf项目,我使用MVVM,但我需要设置文本框的"SelectedText"属性."selectedText"不是依赖属性所以,我不能使用绑定...我该如何解决这个问题?

wpf mvvm

6
推荐指数
1
解决办法
1410
查看次数

libgit2sharp 删除远程分支

我想在本地和远程删除一个分支。我的代码:

using (var repository = new Repository(path))
{
    var remote = repository.Network.Remotes["origin"];
    var options = new PushOptions();
    var credentials = options.CredentialsProvider = GetUserCredentialsProvider();
    options.CredentialsProvider = credentials;
    string pushRefSpec = @"refs/heads/:{0}".FormatWith(branch);
    repository.Network.Push(remote, pushRefSpec);
    repository.Branches.Remove(repository.Branches[branch]);
}
Run Code Online (Sandbox Code Playgroud)

但是我收到 401 错误(“未经授权”)。这是因为分支名称中存在“:”。

但是我读到它们是必要的,因为它们就像本机 git 中的“--delete”。

感谢您的帮助!

c# git libgit2sharp

5
推荐指数
1
解决办法
1300
查看次数

标签 统计

c# ×1

git ×1

libgit2sharp ×1

mvvm ×1

wpf ×1