Exemplo n.º 1
0
        public void Dispose()
        {
            FieldInfo field = m_InitializationBll.GetType().GetField(XML_DOC_FIELD_NAME, BindingFlags.NonPublic | BindingFlags.Instance);

            field.SetValue(m_InitializationBll, m_OldXml);

            m_RootScope.Dispose();
        }
Exemplo n.º 2
0
        private void __Init(InitializationBLL initializationBll)
        {
            m_InitializationBll = initializationBll;
            var field = m_InitializationBll.GetType().GetField(XML_DOC_FIELD_NAME, BindingFlags.NonPublic | BindingFlags.Instance);

            m_OldXml = field.GetValue(m_InitializationBll) as XmlDocument;

            var newValue = new XmlDocument();

            newValue.LoadXml(Properties.Resources.Areas);
            field.SetValue(m_InitializationBll, newValue);

            initializationBll.CustomEstwXmlStream = estw =>
            {
                return(Assembly.GetExecutingAssembly().GetManifestResourceStream($"Leibit.Tests.TestData.{estw.Id}.xml"));
            };

            m_RootScope = new ESTWRootScope();
        }