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


C# Uri.str方法代码示例

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


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

示例1: config

 	public void config(string toolName, string version, string instalDir, string installFile, Uri installUri)
 	{
 		ToolName = toolName;
 		Version = version;    		
 		Install_Dir = instalDir;
 		Install_Uri = installUri;
 		Install_File = installFile;
 		VersionWebDownload =  Install_Uri.str();
 	}
开发者ID:SiGhTfOrbACQ,项目名称:O2.Platform.Scripts,代码行数:9,代码来源:Tool_API.cs

示例2: add_Mapping_Redirect

 public static VirtualArticleAction add_Mapping_Redirect(this TM_Xml_Database tmXmlDatabase, Guid id, Uri redirectUri)
 {
     var virtualAction = new VirtualArticleAction
                                 {
                                     Id = id,
                                     Action = "Redirect",
                                     Redirect_Uri = redirectUri.str()
                                 };
     tmXmlDatabase.getVirtualArticles().add(id, virtualAction);
     tmXmlDatabase.saveVirtualArticles();
     return virtualAction;
 }
开发者ID:TeamMentor,项目名称:Dev,代码行数:12,代码来源:TM_Xml_Database.Virtual_Articles.cs

示例3: download

 	public string download(Uri uri)
 	{
 		"Downloading from Uri: {0}".info(uri);
 		if (uri.isNull())
 			return null;
 		VersionWebDownload = uri.str();
 		
 		//var localFilePath = PublicDI.config.O2TempDir.pathCombine(CurrentVersionZipFile);    	
 		//"downloading file {0} from {1} to {2}".info(CurrentVersionZipFile, CurrentVersionWebDownload,localFilePath);
 		"downloading file {0}".info(VersionWebDownload);
 		    		    	
         //if (new Web().httpFileExists(VersionWebDownload))            
         //{
           //  var downloadedFile =  new Web().downloadBinaryFile(VersionWebDownload);                
           var downloadedFile = VersionWebDownload.download();
             if (downloadedFile.fileExists())
             {
             	var targetFile = tempLocationOf_Install_File();//localDownloadsDir.pathCombine(Install_File);
             	"Copying file: {0}".info(targetFile);
             	Files.Copy(downloadedFile, targetFile);
             	"Deleting file: {0}".info(targetFile);
             	Files.deleteFile(downloadedFile);                	
             	if (targetFile.fileExists())
             		return targetFile;
             }
         //}
         return null;            
 	}
开发者ID:SiGhTfOrbACQ,项目名称:O2.Platform.Scripts,代码行数:28,代码来源:Tool_API.cs

示例4: show

		public ascx_HtmlTagViewer show(Uri uri)
		{	
			if (PageToOpen.notNull())
				PageToOpen.set_Text(uri.str());
			return show(uri.getHtml());
		}
开发者ID:paul-green,项目名称:O2.Platform.Scripts,代码行数:6,代码来源:ascx_HtmlTagViewer.cs

示例5: download

    	public string download(Uri uri)
    	{
    		var targetFile = tempLocationOf_Install_File();//localDownloadsDir.pathCombine(Install_File);
    		if (targetFile.fileExists())
    		{
    			"found previously downloaded copy: {0}".info(targetFile);
    			return targetFile;
    		}
    		"Downloading from Uri: {0}".info(uri);
    		if (uri.isNull())
    			return null;
    		VersionWebDownload = uri.str();
    		
            var downloadedFile = VersionWebDownload.download();
             
            if (downloadedFile.fileExists())
			{
             	for(int i =0 ; i< 5; i++) // try to get the file 5 times since sometimes the file is still not available (due to AV)
             	{
					this.sleep(1000);	            
	            	"Copying file: {0}".info(targetFile);
	            	if (Files.copy(downloadedFile, targetFile).valid())
	            	{
	            		"Deleting file: {0}".info(downloadedFile);
	            		Files.deleteFile(downloadedFile);                	
	            	}
	            	if (targetFile.fileExists())
	            		return targetFile;	            	
	            		            	
	            }	            
	         };
            return null;            
    	}
开发者ID:paul-green,项目名称:O2.Platform.Scripts,代码行数:33,代码来源:Tool_API.cs

示例6: open

 public static WatiN_IE open(this WatiN_IE watinIe, Uri uri)
 {
     return (watinIe.notNull() && uri.notNull())
         ? watinIe.open(uri.str())
         : watinIe;
 }
开发者ID:TeamMentor,项目名称:Dev,代码行数:6,代码来源:Extra_Watin__Extension_Methods.cs

示例7: wait_For_Uri

 public static WatiN_IE wait_For_Uri(this WatiN_IE watinIe, Uri expectedUri,  int maxWait = 1000)
 {
     return (watinIe.notNull() && expectedUri.notNull())
         ? watinIe.wait_For_Url(expectedUri.str(),maxWait)
         : watinIe;
 }
开发者ID:TeamMentor,项目名称:Dev,代码行数:6,代码来源:Extra_Watin__Extension_Methods.cs

示例8: assert_Uri_Is

 public static WatiN_IE assert_Uri_Is(this WatiN_IE watinIe, Uri expectedUri, string message = Extra_NUnit_Messages.ASSERT_URL_IS)
 {
     return (watinIe.notNull() && expectedUri.notNull())
                 ? watinIe.assert_Url_Is(expectedUri.str(),message)
                 : watinIe;
 }
开发者ID:TeamMentor,项目名称:Dev,代码行数:6,代码来源:Extra_Watin_NUnit_Extension_Methods.cs


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