Xamarin 例外:基础
我正在尝试实现IDtech Unimag读卡器。我已经得到了UniMag本机代码的c#绑定库。为了创建unimag对象,我在下面的给定代码中编写Xamarin 例外:基础,xamarin,xamarin.ios,objective-sharpie,Xamarin,Xamarin.ios,Objective Sharpie,我正在尝试实现IDtech Unimag读卡器。我已经得到了UniMag本机代码的c#绑定库。为了创建unimag对象,我在下面的给定代码中编写 \u unimagreder=new uniMag(); //_uniMagReader.ReaderType=BrushfireUniMagBinding.UmReader.Shuttle; _uniMagReader.SetAutoAdjustVolume(真); _uniMagReader.SetSweepTimeoutDuration(0);
\u unimagreder=new uniMag();
//_uniMagReader.ReaderType=BrushfireUniMagBinding.UmReader.Shuttle;
_uniMagReader.SetAutoAdjustVolume(真);
_uniMagReader.SetSweepTimeoutDuration(0);
_uniMagReader.SetAutoAdjustVolume(真);
_uniMagReader.StartUniMag(真);
在第三行,\u unimagreder.SetAutoAdjustVolume(true)
,我得到了以下验证:
Foundation.You\u不应\u在\u此\u方法中调用\u base\u:类型“Foundation.You\u不应\u在\u此\u方法中调用\u base\u”的异常
我不知道为什么会出现这种异常。我搜索了相同的异常,但没有得到答案的真正含义
我的Unimag转换文件如下所示:
<代码>使用基础;
使用制度;
使用系统组件模型;
使用System.Runtime.CompilerServices;
命名空间BrushfireUniMagBinding
{
[型号,寄存器(“uniMag”,假)]
公共类uniMag:NSObject
{
//
//性质
//
[编译生成]
公共虚拟UmReader ReaderType{
[导出(“readerType”)]
得到;
[导出(“setReaderType:”)]
设置
}
//
//建设者
//
[导出(“init”),EditorBrowsable(EditorBrowsableState.Advanced),编译器生成]
公共统一杂志();
[EditorBrowsable(EditorBrowsableState.Advanced),编译器生成]
受保护的uniMag(NST);
//
//静态方法
//
[导出(“enableLogging:”),编译器生成]
公共静态void EnableLogging(bool enable);
[导出(“SDK_版本”),编译生成]
公共静态字符串SDK_version();
//
//方法
//
[导出(“自动检测:”),编译器生成]
公共虚拟空间自动检测(bool自动检测);
[导出(“取消滑动”),编译器生成]
公共虚拟作废取消刷卡();
[导出(“取消任务”),编译器生成]
公共虚拟任务();
[导出(“关闭连接”),编译器生成]
公共虚拟连接();
[导出(“getAuthentication”),编译器生成]
公共虚拟UmRet GetAuthentication();
[导出(“getConnectionStatus”),编译生成]
公共虚拟bool GetConnectionStatus();
[导出(“getFlagByte”),编译器生成]
公共虚拟NSData GetFlagByte();
[导出(“getRunningTask”),编译器生成]
公共虚拟UmTask GetRunningTask();
[导出(“getVolumeLevel”),编译生成]
公共虚拟浮点GetVolumeLevel();
[导出(“getWave”),编译器生成]
公共虚拟数据GetWave();
[导出(“isReaderAttached”),编译生成]
公共虚拟bool是readerated();
[导出(“proceedPoweringUp:”),编译生成]
公共虚拟UmRet ProceedPoweringUp(布尔proceedPowerUp);
[导出(“promptForConnection:”),编译生成]
公共虚拟void PromptForConnection(bool prompt);
[导出(“请求滑动”),编译器生成]
公共虚拟UmRet请求滑动();
[导出(“sendCommandClearBuffer”),编译器生成]
公共虚拟UmRet SendCommandClearBuffer();
[导出(“sendCommandCustom:”),编译器生成]
公共虚拟UmRet SendCommandCustom(NSData cmd);
[导出(“sendCommandDefaultGeneralSettings”),编译器生成]
公共虚拟UmRet SendCommandDefaultGeneralSettings();
[导出(“SendCommandDisableErrorNotification”),编译器生成]
公共虚拟UmRet SendCommandDisableErrorNotification();
[导出(“sendCommandDisableExpDate”),编译器生成]
公共虚拟UmRet SendCommandDisableExpDate();
[导出(“sendCommandDisableForceEncryption”),编译器生成]
公共虚拟UmRet SendCommandDisableForceEncryption();
[导出(“SendCommandEnables”),编译生成]
公共虚拟UmRet sendcommandenablees();
[导出(“SendCommandEnableErrorNotification”),编译器生成]
公共虚拟UmRet SendCommandEnableErrNotification();
[导出(“sendCommandEnableExpDate”),编译器生成]
公共虚拟UmRet SendCommandEnableExpDate();
[导出(“sendCommandEnableForceEncryption”),编译器生成]
公共虚拟UmRet SendCommandEnableForceEncryption();
[导出(“SendCommandEnabledES”),编译生成]
公共虚拟UmRet SendCommandEnableTDES();
[导出(“sendCommandGetNextKSN”),编译器生成]
公共虚拟UmRet SendCommandGetNextKSN();
[导出(“sendCommandGetSerialNumber”),编译器生成]
公共虚拟UmRet SendCommandGetSerialNumber();
[导出(“sendCommandGetSettings”),编译器生成]
公共虚拟UmRet SendCommandGetSettings();
[导出(“sendCommandGetVersion”),编译器生成]
公共虚拟UmRet SendCommandGetVersion();
[导出(“sendCommandResetBaudRate”),编译器生成]
公共虚拟UmRet SendCommandResetBaudRate();
[导出(“sendCommandSetPrePAN:”),编译器生成]
公共虚拟UmRet SendCommandSetPrePAN(int-prePAN);
[导出(“setAutoAdjustVolume:”),编译生成]
公共虚拟空间设置自动调整卷(bool b);
[导出(“setAutoConnect:”),编译生成]
公共虚拟连接(bool自动连接);
[导出(“setCmdTimeoutDuration:”),编译器生成]
公共虚拟bool SetCmdTimeoutDuration(整数秒);
[出口(东南)
[Export ("setAutoAdjustVolume:"), CompilerGenerated]
public virtual void SetAutoAdjustVolume (bool b);