Пример #1
0
 public void GetInfo_Test()
 {
     var expected = new ProcessGSInfo(1, "TestName", "TestSystemName", true, new MobileObservableCollection<string> { "1", "2" });
     var actual = new ProcessGsInfo(1, "TestName", "TestSystemName", true, new MobileObservableCollection<string> { "1", "2" }).GetInfo();
     Assert.AreEqual(expected.DisplayName, actual.DisplayName);
     Assert.AreEqual(expected.Id, actual.Id);
     Assert.AreEqual(expected.SystemName, actual.SystemName);
     Assert.AreEqual(expected.FieldName.Count, actual.FieldName.Count);
 }
Пример #2
0
        public bool UppdateGlobalSearchForProcess(ProcessGSInfo process, GlobalSearchAppDomainCreationResult domainData)
        {
            if (process == null)
            {
                return false;
            }

            try
            {
                if (domainData == null || domainData.AppDomain == null)
                {
                    throw new VeyronException("Given Domain is Null");
                }

                var result = domainData.DynamicAssembly.UpdateGlobalSearchProcess(process.IsSystem, process.SystemName, process.DisplayName, process.FieldName.ToArray());
                
                return result;
            }
            catch (Exception ex)
            {
                if (domainData != null && domainData.AppDomain != null && !domainData.AppDomain.IsFinalizingForUnload())
                {
                    DeleteTemporaryDirectory(domainData.AppDomain.FriendlyName);
                    AppDomain.Unload(domainData.AppDomain);
                }

                Logger.Log(LogSeverity.Error, "Global Search Error", "/GlobalSearchService/UppdateGlobalSearchForProcess/" + ex);
                _error = "Global Search Error : " + ex.Message;
                throw;
            }
        }