예제 #1
0
        /// <summary>
        /// Init Application class
        /// </summary>
        /// <param name="appDisplayName">App display name</param>
        /// <param name="shellPageType">Shell page type</param>
        /// <param name="mainPageType">Main page type</param>
        /// <param name="settingsPageType">Settings page type</param>
        public ApplicationBase(string appDisplayName, Type shellPageType, Type mainPageType, Type settingsPageType)
        {
            this.shellPageType    = shellPageType;
            this.mainPageType     = mainPageType;
            this.SettingsPageType = settingsPageType;
            ModuleAnalyser        = new ModuleAnalyser();

            AppDisplayName = appDisplayName;
            Current        = this;

            PropertyChangedNotifier = new PropertyChangedNotifier();

            RegisterModules();
            ModuleAnalyser = ModuleManager.ModuleAnalyser;

            Suspending += OnSuspending;
        }
예제 #2
0
        public void AnalyzerTest()
        {
            ModuleAnalyser analyzer = new ModuleAnalyser();

            var analyzeResult = analyzer.AnalyseAndGet(typeof(TestClassNotBaseItem));

            PropertyAnalyze prop1 = new PropertyAnalyze("StringProp", typeof(string), new List <object>()
            {
                new UIIgnoreAttribute(),
                new DbIgnoreAttribute(),
                new UIParamsAttribute()
                {
                    UseLongTextInput = true
                }
            });

            PropertyAnalyze prop2 = new PropertyAnalyze("IntProp", typeof(int), new List <object>());

            Assert.IsTrue(analyzeResult.Values.ToList()[0].Equals(prop1));
            Assert.IsTrue(analyzeResult.Values.ToList()[1].Equals(prop2));
        }