本文整理匯總了C#中MonoMac.Foundation.NSUrl.ToString方法的典型用法代碼示例。如果您正苦於以下問題:C# NSUrl.ToString方法的具體用法?C# NSUrl.ToString怎麽用?C# NSUrl.ToString使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類MonoMac.Foundation.NSUrl
的用法示例。
在下文中一共展示了NSUrl.ToString方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: ReadFromUrl
public override bool ReadFromUrl (NSUrl url, string typeName, out NSError outError)
{
Console.WriteLine ("ReadFromUrl : {0}", url.ToString ());
outError = null;
// if scheme is not right, we ignore the url
if (url.Scheme != "monodoc" && url.Scheme != "mdoc")
return true;
// ResourceSpecifier is e.g. "//T:System.String"
initialLoadFromUrl = Uri.UnescapeDataString (url.ResourceSpecifier.Substring (2));
this.FileUrl = url;
return true;
}
示例2: ReadFromUrl
public override bool ReadFromUrl (NSUrl url, string typeName, out NSError outError)
{
Console.WriteLine ("ReadFromUrl : {0}", url.ToString ());
outError = null;
const int NSServiceMiscellaneousError = 66800;
if (url.Scheme != "monodoc" && url.Scheme != "mdoc") {
outError = new NSError (NSError.CocoaErrorDomain,
NSServiceMiscellaneousError,
NSDictionary.FromObjectAndKey (NSError.LocalizedFailureReasonErrorKey, new NSString (string.Format ("Scheme {0} isn't supported", url.Scheme))));
return false;
}
// ResourceSpecifier is e.g. "//T:System.String"
initialLoadFromUrl = Uri.UnescapeDataString (url.ResourceSpecifier.Substring (2));
this.FileUrl = url;
return true;
}