本文整理汇总了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;
}