コード例 #1
0
        private static void LoadMCX(this Oms oms, MochaSnapshotObjectModel mcx)
        {
            foreach (MochaSnapshotTransaction t in mcx.Transactions)
            {
                oms.DefaultTenant = oms.GetTenant(t.TenantName);
                if (oms.DefaultTenant.IsEmpty)
                {
                    throw new InvalidOperationException("attempted to load snapshot for nonexistent tenant");
                }

                oms.BeginTransaction();
                for (int j = 0; j < t.Operations.Count; j++)
                {
                    oms.LoadMCXOperation(t.Operations[j]);
                }
                oms.CommitTransaction();
            }
        }