當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。