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


C# Transport.URIish类代码示例

本文整理汇总了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);
        }
开发者ID:dev218,项目名称:GitSharp,代码行数:7,代码来源:TransportGitAnon.cs

示例2: SubmoduleEntry

 public SubmoduleEntry(string name, string path, URIish url, UpdateMethod update)
 {
     Name = name;
     Path = path;
     Url = url;
     Update = update;
 }
开发者ID:dev218,项目名称:GitSharp,代码行数:7,代码来源:SubmoduleConfig.cs

示例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;
        }
开发者ID:dev218,项目名称:GitSharp,代码行数:33,代码来源:TransportGitSsh.cs

示例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;
        }
开发者ID:georgeck,项目名称:GitSharp,代码行数:31,代码来源:TransportGitSsh.cs

示例5: FetchHeadRecord

 public FetchHeadRecord(ObjectId newValue, bool notForMerge, string sourceName, URIish sourceUri)
 {
     NewValue = newValue;
     NotForMerge = notForMerge;
     SourceName = sourceName;
     SourceURI = sourceUri;
 }
开发者ID:dev218,项目名称:GitSharp,代码行数:7,代码来源:FetchHeadRecord.cs

示例6: canHandle

        public static bool canHandle(URIish uri)
        {
            if (uri == null)
                throw new ArgumentNullException ("uri");

            return uri.IsRemote && "sftp".Equals(uri.Scheme);
        }
开发者ID:stschake,项目名称:GitSharp,代码行数:7,代码来源:TransportSftp.cs

示例7: canHandle

        public static bool canHandle(URIish uri)
        {
            if (!uri.IsRemote)
            {
                return false;
            }

            return S3_SCHEME == uri.Scheme;
        }
开发者ID:jagregory,项目名称:GitSharp,代码行数:9,代码来源:TransportAmazonS3.cs

示例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));
 }
开发者ID:dev218,项目名称:GitSharp,代码行数:10,代码来源:URIishTests.cs

示例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));
 }
开发者ID:dev218,项目名称:GitSharp,代码行数:10,代码来源:URIishTests.cs

示例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));
 }
开发者ID:nestalk,项目名称:GitSharp,代码行数:10,代码来源:URIishTests.cs

示例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);
        }
开发者ID:yolanother,项目名称:GitSharp,代码行数:11,代码来源:TransportLocal.cs

示例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));
 }
开发者ID:nestalk,项目名称:GitSharp,代码行数:11,代码来源:URIishTests.cs

示例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;
	    }
开发者ID:dev218,项目名称:GitSharp,代码行数:12,代码来源:TransportAmazonS3.cs

示例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);
        }
开发者ID:dev218,项目名称:GitSharp,代码行数:12,代码来源:TransportHttp.cs

示例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;
        }
开发者ID:jagregory,项目名称:GitSharp,代码行数:14,代码来源:TransportLocal.cs


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