本文整理汇总了C#中GitSharp.Core.Transport.URIish类的典型用法代码示例。如果您正苦于以下问题:C# URIish类的具体用法?C# URIish怎么用?C# URIish使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
URIish类属于GitSharp.Core.Transport命名空间,在下文中一共展示了URIish类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: canHandle
public static bool canHandle(URIish uri)
{
if (uri == null)
throw new System.ArgumentNullException("uri");
return "git".Equals(uri.Scheme);
}
示例2: SubmoduleEntry
public SubmoduleEntry(string name, string path, URIish url, UpdateMethod update)
{
Name = name;
Path = path;
Url = url;
Update = update;
}
示例3: canHandle
public static bool canHandle(URIish uri)
{
if (uri == null)
throw new ArgumentNullException("uri");
if (!uri.IsRemote)
{
return false;
}
string scheme = uri.Scheme;
if ("ssh".Equals(scheme))
{
return true;
}
if ("ssh+git".Equals(scheme))
{
return true;
}
if ("git+ssh".Equals(scheme))
{
return true;
}
if (scheme == null && uri.Host != null && uri.Path != null)
{
return true;
}
return false;
}
示例4: canHandle
public static bool canHandle(URIish uri)
{
if (!uri.IsRemote)
{
return false;
}
string scheme = uri.Scheme;
if ("ssh".Equals(scheme))
{
return true;
}
if ("ssh+git".Equals(scheme))
{
return true;
}
if ("git+ssh".Equals(scheme))
{
return true;
}
if (scheme == null && uri.Host != null && uri.Path != null)
{
return true;
}
return false;
}
示例5: FetchHeadRecord
public FetchHeadRecord(ObjectId newValue, bool notForMerge, string sourceName, URIish sourceUri)
{
NewValue = newValue;
NotForMerge = notForMerge;
SourceName = sourceName;
SourceURI = sourceUri;
}
示例6: canHandle
public static bool canHandle(URIish uri)
{
if (uri == null)
throw new ArgumentNullException ("uri");
return uri.IsRemote && "sftp".Equals(uri.Scheme);
}
示例7: canHandle
public static bool canHandle(URIish uri)
{
if (!uri.IsRemote)
{
return false;
}
return S3_SCHEME == uri.Scheme;
}
示例8: testWindowsFile2
public void testWindowsFile2()
{
const string str = "D:\\m y";
var u = new URIish(str);
Assert.IsNull(u.Scheme);
Assert.IsFalse(u.IsRemote);
Assert.AreEqual("D:/m y", u.Path);
Assert.AreEqual("D:/m y", u.ToString());
Assert.AreEqual(u, new URIish(str));
}
示例9: testUnixFile
public void testUnixFile()
{
const string str = "/home/m y";
var u = new URIish(str);
Assert.IsNull(u.Scheme);
Assert.IsFalse(u.IsRemote);
Assert.AreEqual(str, u.Path);
Assert.AreEqual(str, u.ToString());
Assert.AreEqual(u, new URIish(str));
}
示例10: testFileProtoWindows
public void testFileProtoWindows()
{
const string str = "file:///D:/m y";
var u = new URIish(str);
Assert.AreEqual("file", u.Scheme);
Assert.IsFalse(u.IsRemote);
Assert.AreEqual("D:/m y", u.Path);
Assert.AreEqual(str, u.ToString());
Assert.AreEqual(u, new URIish(str));
}
示例11: TransportLocal
public TransportLocal(Repository local, URIish uri)
: base(local, uri)
{
string dir = FS.resolve(new DirectoryInfo(PWD), uri.Path).FullName;
if(Directory.Exists(Path.Combine(dir, Constants.DOT_GIT)))
{
dir = Path.Combine(dir, Constants.DOT_GIT);
}
remoteGitDir = new DirectoryInfo(dir);
}
示例12: testGitProtoUnix
public void testGitProtoUnix()
{
const string str = "git://example.com/home/m y";
var u = new URIish(str);
Assert.AreEqual("git", u.Scheme);
Assert.IsTrue(u.IsRemote);
Assert.AreEqual("example.com", u.Host);
Assert.AreEqual("/home/m y", u.Path);
Assert.AreEqual(str, u.ToString());
Assert.AreEqual(u, new URIish(str));
}
示例13: canHandle
public static bool canHandle(URIish uri)
{
if (uri == null)
throw new ArgumentNullException ("uri");
if (!uri.IsRemote)
{
return false;
}
return S3_SCHEME == uri.Scheme;
}
示例14: canHandle
public static bool canHandle(URIish uri)
{
if (uri == null)
throw new ArgumentNullException("uri");
if (!uri.IsRemote)
{
return false;
}
string s = uri.Scheme;
return "http".Equals(s) || "https".Equals(s) || "ftp".Equals(s);
}
示例15: canHandle
public static bool canHandle(URIish uri)
{
if (uri.Host != null || uri.Port > 0 || uri.User != null || uri.Pass != null || uri.Path == null)
{
return false;
}
if ("file".Equals(uri.Scheme) || uri.Scheme == null)
{
return FS.resolve(new DirectoryInfo(PWD), uri.Path).Exists;
}
return false;
}