示例#1
0
        // private ExStoreRtnCodes test01_2()
        // {
        //  Entity e = null;
        //
        //  ExStoreRoot xRoot = ExStoreRoot.Instance();
        //
        //  Schema sRoot = XsMgr.MakeRootSchema(xRoot);
        //
        //  DsMgr.CreateDataStorage(sRoot, out e);
        //
        //  // xRoot.ExStoreGuid = Guid.NewGuid();
        //  //
        //  // sRoot = XsMgr.MakeRootSchema(xRoot);
        //  //
        //  // DataStorageManager.Instance.CreateDataStorage(sRoot);
        //  //
        //  //
        //  //
        //  // xRoot.ExStoreGuid = Guid.NewGuid();
        //  //
        //  // sRoot = XsMgr.MakeRootSchema(xRoot);
        //  //
        //  // DataStorageManager.Instance.CreateDataStorage(sRoot);
        //
        //  e = XsMgr.CheckRootDataStorExists();
        //
        //  return ExStoreRtnCodes.XRC_GOOD;
        // }

        private ExStoreRtnCodes test01_1()
        {
            ExStoreRtnCodes result;

            if (!DsMgr[DataStoreIdx.ROOT_DATA_STORE].GotDataStorage)
            {
                DsNotExist();
                return(ExStoreRtnCodes.XRC_FAIL);
            }

            // create sample root storage
            result = ExStorageTests.MakeRootExStorage();
            if (result != ExStoreRtnCodes.XRC_GOOD)
            {
                return(result);
            }

            // create sample app and cell storage
            result = ExStorageTests.MakeAppAndCellsExStorage();
            if (result != ExStoreRtnCodes.XRC_GOOD)
            {
                return(result);
            }

            return(ExStoreRtnCodes.XRC_GOOD);
        }
示例#2
0
        private Result Test01()
        {
            if (AppRibbon.Doc.IsDetached)
            {
                return(Result.Cancelled);
            }

            ExStoreRoot     xRoot = ExStoreRoot.Instance();
            ExStoreRtnCodes result;

            // result = XsMgr.Initialize();
            // if (result != ExStoreRtnCodes.GOOD) return Result.Failed;
            //
            // result = XsMgr.Configure();
            // if (result != ExStoreRtnCodes.GOOD) return Result.Failed;

            result = ExStorageTests.MakeRootExStorage();
            if (result != ExStoreRtnCodes.XRC_GOOD)
            {
                return(Result.Failed);
            }

            return(Result.Succeeded);
        }