public DocumentManager() { this._moduleManager = new ModuleManager() { EntityManager = this.EntityManager }; /*in constructor deserializam configuratia*/ Stream stream = null; try { stream = File.OpenRead(ConfigFile); BinaryFormatter bf = new BinaryFormatter(); this._config = bf.Deserialize(stream) as DocumentManagerConfig; if (this._config == null) { throw new Exception(); } } catch (Exception) { this._config = new DocumentManagerConfig(); } finally { if (stream != null) { stream.Close(); } } }
public DocumentManager() { this._moduleManager = new ModuleManager() { EntityManager = this.EntityManager }; /*in constructor deserializam configuratia*/ Stream stream = null; try { stream = File.OpenRead(ConfigFile); BinaryFormatter bf = new BinaryFormatter(); this._config = bf.Deserialize(stream) as DocumentManagerConfig; if (this._config == null) throw new Exception(); } catch (Exception) { this._config = new DocumentManagerConfig(); } finally { if (stream != null) stream.Close(); } }