我确实理解静态类不能声明实例成员,但是这是由于生成
编译器输入: APIDefinition.cs
// @interface CallKitIntegration (TVOCall) [Category] [BaseType(typeof(TVOCall))] interface TVOCall_CallKitIntegration // @property (nonatomic, strong) NSUUID * _Nonnull uuid; [Export("uuid", ArgumentSemantic.Strong)] NSUuid Uuid { get; set; }
中间编译器输出: TVOCall_CallKitIntegration.g.cs
namespace TwilioVoiceBindingBeta19 { public unsafe static partial class TVOCall_CallKitIntegration { [CompilerGenerated] static readonly IntPtr class_ptr = Class.GetHandle ("TVOCall"); [CompilerGenerated] public virtual NSUuid Uuid { [Export ("uuid", ArgumentSemantic.Retain)] get { NSUuid ret; if (IsDirectBinding) { ret = Runtime.GetNSObject<NSUuid> (global::ApiDefinition.Messaging.IntPtr_objc_msgSend (this.Handle, Selector.GetHandle ("uuid"))); } else { ret = Runtime.GetNSObject<NSUuid> (global::ApiDefinition.Messaging.IntPtr_objc_msgSendSuper (this.SuperHandle, Selector.GetHandle ("uuid"))); return ret; }
哪些对APIDefinition的正确更改会导致g文件的正确生成?
【玩转 GPU】有奖征文
精美礼品等你拿!
改变到这个
// @interface CallKitIntegration (TVOCall) [Category] [BaseType(typeof(TVOCall))] interface TVOCall_CallKitIntegration