当前位置: 首页>>代码示例>>C#>>正文


C# GitModule.GetPathSetting方法代码示例

本文整理汇总了C#中GitCommands.GitModule.GetPathSetting方法的典型用法代码示例。如果您正苦于以下问题:C# GitModule.GetPathSetting方法的具体用法?C# GitModule.GetPathSetting怎么用?C# GitModule.GetPathSetting使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在GitCommands.GitModule的用法示例。


在下文中一共展示了GitModule.GetPathSetting方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RunScript


//.........这里部分代码省略.........
                        break;
                    case "{sRemoteBranch}":
                        if (selectedRemoteBranches.Count == 1)
                            argument = argument.Replace(option, selectedRemoteBranches[0].Name);
                        else if (selectedRemoteBranches.Count != 0)
                            argument = argument.Replace(option,
                                                        askToSpecify(selectedRemoteBranches,
                                                                     "Selected Revision Remote Branch"));
                        else
                            argument = argument.Replace(option, "");
                        break;
                    case "{sRemote}":
                        if (selectedRemotes.Count == 0)
                        {
                            argument = argument.Replace(option, "");
                            break;
                        }
                        if (selectedRemotes.Count == 1)
                            remote = selectedRemotes[0];
                        else
                            remote = askToSpecify(selectedRemotes, "Selected Revision Remote");
                        argument = argument.Replace(option, remote);
                        break;
                    case "{sRemoteUrl}":
                        if (selectedRemotes.Count == 0)
                        {
                            argument = argument.Replace(option, "");
                            break;
                        }
                        if (selectedRemotes.Count == 1)
                            remote = selectedRemotes[0];
                        else
                            remote = askToSpecify(selectedRemotes, "Selected Revision Remote");
                        url = aModule.GetPathSetting(string.Format(SettingKeyString.RemoteUrl, remote));
                        argument = argument.Replace(option, url);
                        break;
                    case "{sRemotePathFromUrl}":
                        if (selectedRemotes.Count == 0)
                        {
                            argument = argument.Replace(option, "");
                            break;
                        }
                        if (selectedRemotes.Count == 1)
                            remote = selectedRemotes[0];
                        else
                            remote = askToSpecify(selectedRemotes, "Selected Revision Remote");
                        url = aModule.GetPathSetting(string.Format(SettingKeyString.RemoteUrl, remote));
                        argument = argument.Replace(option, GetRemotePath(url));
                        break;
                    case "{sHash}":
                        argument = argument.Replace(option, selectedRevision.Guid);
                        break;
                    case "{sMessage}":
                        argument = argument.Replace(option, selectedRevision.Message);
                        break;
                    case "{sAuthor}":
                        argument = argument.Replace(option, selectedRevision.Author);
                        break;
                    case "{sCommitter}":
                        argument = argument.Replace(option, selectedRevision.Committer);
                        break;
                    case "{sAuthorDate}":
                        argument = argument.Replace(option, selectedRevision.AuthorDate.ToString());
                        break;
                    case "{sCommitDate}":
                        argument = argument.Replace(option, selectedRevision.CommitDate.ToString());
开发者ID:rooflz,项目名称:gitextensions,代码行数:67,代码来源:ScriptRunner.cs

示例2: RunScript


//.........这里部分代码省略.........
                        break;
                    case "{sRemoteBranch}":
                        if (selectedRemoteBranches.Count == 1)
                            argument = argument.Replace(option, selectedRemoteBranches[0].Name);
                        else if (selectedRemoteBranches.Count != 0)
                            argument = argument.Replace(option,
                                                        askToSpecify(selectedRemoteBranches,
                                                                     "Selected Revision Remote Branch"));
                        else
                            argument = argument.Replace(option, "");
                        break;
                    case "{sRemote}":
                        if (selectedRemotes.Count == 0)
                        {
                            argument = argument.Replace(option, "");
                            break;
                        }
                        if (selectedRemotes.Count == 1)
                            remote = selectedRemotes[0];
                        else
                            remote = askToSpecify(selectedRemotes, "Selected Revision Remote");
                        argument = argument.Replace(option, remote);
                        break;
                    case "{sRemoteUrl}":
                        if (selectedRemotes.Count == 0)
                        {
                            argument = argument.Replace(option, "");
                            break;
                        }
                        if (selectedRemotes.Count == 1)
                            remote = selectedRemotes[0];
                        else
                            remote = askToSpecify(selectedRemotes, "Selected Revision Remote");
                        url = aModule.GetPathSetting(string.Format(SettingKeyString.RemoteUrl, remote));
                        argument = argument.Replace(option, url);
                        break;
                    case "{sRemotePathFromUrl}":
                        if (selectedRemotes.Count == 0)
                        {
                            argument = argument.Replace(option, "");
                            break;
                        }
                        if (selectedRemotes.Count == 1)
                            remote = selectedRemotes[0];
                        else
                            remote = askToSpecify(selectedRemotes, "Selected Revision Remote");
                        url = aModule.GetPathSetting(string.Format(SettingKeyString.RemoteUrl, remote));
                        argument = argument.Replace(option, GetRemotePath(url));
                        break;
                    case "{sHash}":
                        argument = argument.Replace(option, selectedRevision.Guid);
                        break;
                    case "{sMessage}":
                        argument = argument.Replace(option, selectedRevision.Message);
                        break;
                    case "{sAuthor}":
                        argument = argument.Replace(option, selectedRevision.Author);
                        break;
                    case "{sCommitter}":
                        argument = argument.Replace(option, selectedRevision.Committer);
                        break;
                    case "{sAuthorDate}":
                        argument = argument.Replace(option, selectedRevision.AuthorDate.ToString());
                        break;
                    case "{sCommitDate}":
                        argument = argument.Replace(option, selectedRevision.CommitDate.ToString());
开发者ID:renpan,项目名称:gitextensions,代码行数:67,代码来源:ScriptRunner.cs


注:本文中的GitCommands.GitModule.GetPathSetting方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。