【发布时间】:2017-11-01 12:54:47
【问题描述】:
我知道静态类不能声明实例成员,但是这是由于生成了
编译器的输入: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 文件?
【问题讨论】:
标签: c# objective-c xamarin.ios twilio objective-sharpie