コード例 #1
0
ファイル: SiteContextImpl.cs プロジェクト: hdgardner/ECF
        /// <summary>
        /// Initializes a new instance of the <see cref="CatalogContext"/> class.
        /// </summary>
        /// <param name="context">The context.</param>
        public CatalogContextImpl(MetaDataContext context)
        {
            // Perform auto configuration
            if (CatalogConfiguration.Instance.AutoConfigure)
            {
                // Check if we already configured meta data
                MetaClass metaClass = MetaClass.Load(context, "CatalogEntry");

                // Setup meta data
                if (metaClass == null)
                {
                    CatalogConfiguration.ConfigureMetaData();
                }
            }
        }
コード例 #2
0
ファイル: CatalogSystem_Conf.cs プロジェクト: hdgardner/ECF
        //
        // You can use the following additional attributes as you write your tests:
        //
        // Use ClassInitialize to run code before running the first test in the class
        // [ClassInitialize()]
        // public static void MyClassInitialize(TestContext testContext) { }
        //
        // Use ClassCleanup to run code after all tests in a class have run
        // [ClassCleanup()]
        // public static void MyClassCleanup() { }
        //
        // Use TestInitialize to run code before running each test
        // [TestInitialize()]
        // public void MyTestInitialize() { }
        //
        // Use TestCleanup to run code after each test has run
        // [TestCleanup()]
        // public void MyTestCleanup() { }
        //
        #endregion

        /// <summary>
        /// Restores the meta data.
        /// </summary>
        private static void RestoreMetaData()
        {
            CatalogConfiguration.ConfigureMetaData();
        }