0

iBoxDb を起動して実行しようとしていますが、接続を開こうとすると ArgumentNullException が発生します。まったく同じコードが Windows Phone 8.1 Silverlightでは正常に機能しますが、WP 8.1ランタイムでは機能しません。""(のさまざまな組み合わせ)の代わりにパスパラメーターを渡そうとしましたApplicationData.Current.LocalFolderが、まだ何もありません。

iBoxDb にはほとんどドキュメントがないので、私は本当にアイデアがありません :|

コード:

    ... 
    private readonly AutoBox _db;

    public iBoxDbRepository()
    {
        var server = new DB(1, "", true);
        _db = server.Open();
    }
    ...

スタックトレース:

System.ArgumentNullException occurred _HResult=-2147467261 _message=Value cannot be null. HResult=-2147467261 IsTransient=false Message=Value cannot be null. Parameter name: path1 Source=mscorlib ParamName=path1 StackTrace: at System.IO.Path.Combine(String path1, String path2) at System.IO.IsolatedStorage.IsolatedStorageFile.FetchOrCreateRoot() at System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStore(String group, String id) at System.IO.IsolatedStorage.IsolatedStorageFile.GetUserStoreForApplication() at iBoxDB.LocalServer.IO.BoxIsolatedStorageFileStreamConfig.GetIsolatedStorageFile() at iBoxDB.LocalServer.IO.BoxIsolatedStorageFileStreamConfig.CreateIsolatedStorageFileStream(String path, StreamAccess access) at iBoxDB.LocalServer.IO.BoxIsolatedStorageFileStreamConfig.CreateStream(String path, StreamAccess access) at q..ctor(String A_0, DatabaseConfig A_1, IBoxRecycler A_2) at er.a(DatabaseConfig A_0, String A_1, IBoxRecycler A_2) at ac..ctor(Int64 A_0, String A_1, DatabaseConfig A_2, IBoxRecycler A_3) at iBoxDB.LocalServer.LocalDatabaseServer.a(String A_0, Int64 A_1) at iBoxDB.LocalServer.LocalDatabaseServer.GetInstance(Int64 address) at iBoxDB.LocalServer.DB.Open(Int64 destAddr) at Budget.Data.iBoxDbRepository..ctor() at lambda_method(Closure ) at SimpleInjector.Lifestyles.SingletonLifestyle.SingletonLifestyleRegistrationBase'1.CreateInstanceWithNullCheck() at System.Lazy'1.CreateValue()

4

1 に答える 1

1

IsolatedStorageFile.FetchOrCreateRoot() にはパラメーターがなく、何もできません。WP 8.1 ランタイムは異なる IO API を使用し、新しい DatabaseConfig を実装するか、iBoxDB を更新してから、'WSDatabaseConfig' を使用します。

于 2015-03-22T17:04:16.703 に答える