libdb/examples/csharp/excs_repquote/RepQuoteEnvironment.cs
2011-09-13 13:44:24 -04:00

45 lines
1 KiB
C#

/*-
* See the file LICENSE for redistribution information.
*
* Copyright (c) 2009, 2011 Oracle and/or its affiliates. All rights reserved.
*
*/
using System;
using System.Collections.Generic;
using System.Text;
using BerkeleyDB;
namespace excs_repquote
{
public class RepQuoteEnvironment
{
private bool _appFinished;
private bool _inClientSync;
private bool _isMaster;
public DatabaseEnvironment env;
public bool AppFinished {
get { return _appFinished; }
set { _appFinished = value; }
}
public bool InClientSync {
get { return _inClientSync; }
set { _inClientSync = value; }
}
public bool IsMaster {
get { return _isMaster; }
set { _isMaster = value; }
}
public static RepQuoteEnvironment Open(string home, DatabaseEnvironmentConfig cfg)
{
RepQuoteEnvironment dbEnv = new RepQuoteEnvironment();
dbEnv.env = DatabaseEnvironment.Open(home, cfg);
dbEnv._appFinished = false;
dbEnv._inClientSync = false;
dbEnv._isMaster = false;
return dbEnv;
}
}
}