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


C# NSObject.GetType方法代码示例

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


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

示例1: CheckToString

 protected override void CheckToString(NSObject obj)
 {
     switch (obj.GetType ().FullName) {
     // native crash calling MonoMac.Foundation.NSObject.get_Description ()
     case "WebKit.WKNavigationAction":
     case "WebKit.WKFrameInfo": //  EXC_BAD_ACCESS (code=1, address=0x0)
     case "MonoMac.Foundation.NSUrlConnection":
     case "Foundation.NSUrlConnection":
     case "MonoMac.AppKit.NSLayoutConstraint": // Unable to create description in descriptionForLayoutAttribute_layoutItem_coefficient. Something is nil
     case "AppKit.NSLayoutConstraint":
     case "MonoMac.AVFoundation.AVPlayerItemTrack":
     case "AVFoundation.AVPlayerItemTrack":
     // 10.8
     case "MonoMac.AVFoundation.AVComposition":
     case "AVFoundation.AVComposition":
     case "MonoMac.GameKit.GKPlayer": // Crashing on 10.8.3 from the Apple beta channel for abock (on 2013-01-30)
     case "GameKit.GKPlayer":
     case "MonoMac.AVFoundation.AVAssetResourceLoadingRequest": // Crashing on 10.9.1 for abock (2014-01-13)
     case "AVFoundation.AVAssetResourceLoadingRequest":
     case "MonoMac.AVFoundation.AVAssetResourceLoadingDataRequest": // Crashes on 10.9.3 for chamons (constructor found in AVCompat)
     case "AVFoundation.AVAssetResourceLoadingDataRequest":
     case "MonoMac.AVFoundation.AVCaptureDeviceInputSource": // Crashes on 10.9.5
     case "AVFoundation.AVCaptureDeviceInputSource":
         break;
     default:
         base.CheckToString (obj);
         break;
     }
 }
开发者ID:yudhitech,项目名称:xamarin-macios,代码行数:29,代码来源:MacApiCtorInitTest.cs

示例2: CheckNSObjectProtocol

 protected override void CheckNSObjectProtocol(NSObject obj)
 {
     switch (obj.GetType ().Name) {
     case "NSString":
         // according to bots `isKindOf (null)` returns true before Yosemite
         break;
     case "SBObject":
         // *** NSForwarding: warning: object 0x77a49a0 of class '__NSMessageBuilder' does not implement doesNotRecognizeSelector: -- abort
         break;
     default:
         base.CheckNSObjectProtocol (obj);
         break;
     }
 }
开发者ID:yudhitech,项目名称:xamarin-macios,代码行数:14,代码来源:MacApiCtorInitTest.cs

示例3: CheckIsDirectBinding

 /// <summary>
 /// Checks that the IsDirectBinding property is identical to the IsWrapper property of the Register attribute.
 /// </summary>
 /// <param name="obj">Object.</param>
 protected virtual void CheckIsDirectBinding(NSObject obj)
 {
     var attrib = obj.GetType ().GetCustomAttribute<RegisterAttribute> (false);
     // only check types that we register - that way we avoid the 118 MonoTouch.CoreImagge.CI* "special" types
     if (attrib == null)
         return;
     var is_wrapper = attrib != null && attrib.IsWrapper;
     var is_direct_binding = GetIsDirectBinding (obj);
     if (is_direct_binding != is_wrapper)
         ReportError ("{0} : IsDirectBinding (expected {1}, got {2})", instance_type_name, is_wrapper, is_direct_binding);
 }
开发者ID:yudhitech,项目名称:xamarin-macios,代码行数:15,代码来源:ApiCtorInitTest.cs

示例4: SaveDocument

		public override void SaveDocument (NSObject delegateObject, MonoMac.ObjCRuntime.Selector didSaveSelector, IntPtr contextInfo) {
			Logger.Debug ("Not sure what this is doing yet SaveDocument {0}", delegateObject.GetType ());
			SaveData ();
		}
开发者ID:gitter-badger,项目名称:tomboy.osx,代码行数:4,代码来源:MyDocument.cs


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