public void Setup() { CM = ContextSystem.Manager; CM.RegisterCustomContextImplementation(typeof(CompoundContextImp), typeof(ICompoundContext)); CM.RegisterCustomContextImplementation(typeof(JoinContextImp), typeof(IJoinContext)); CM.RegisterCustomContextImplementation(typeof(WorkingJoinContextImp), typeof(IWorkingJoinContext)); }
public void Setup() { CM = ContextSystem.Manager; CM.RegisterCustomContextImplementation(typeof(NamedDependenciesContextImpl), typeof(INamedDependenciesContext2)); CM.RegisterCustomContextImplementation(typeof(NamedDependenciesContextImpl), typeof(INamedDependenciesContext)); CM.RegisterCustomContextImplementation(typeof(NamedDependenciesContextImpl), typeof(INamedDependenciesContext2a)); }
public DriveDistance(ContextManager pManager, string sInstanceName) { //Initialize Region Variables m_drivedistancesm = StateEnum.NOSTATE; m_sInstanceName = sInstanceName; m_sType = "DriveDistance"; m_StateMachineImpl = new StateMachineImpl(this, pManager); }
public void Setup() { CM = ContextSystem.Manager; CM.RegisterCustomContextImplementation(typeof(DependencyTestContextTop), typeof(IDependencyTestContext)); CM.RegisterCustomContextImplementation(typeof(DependencyTestContextTop), typeof(IDependencyTestContext2)); CM.RegisterCustomContextImplementation(typeof(DependencyTestContextTop), typeof(IDependencyTestContext2a)); CM.RegisterCustomContextImplementation(typeof(DependencyTestContextTop), typeof(IDependencyTestContextAttributed)); CM.RegisterCustomContextImplementation(typeof(DependencyTestContextTop), typeof(IDependencyTestCyclic)); CM.RegisterCustomContextImplementation(typeof(DependencyTestContextTop), typeof(IDependencyTestProperyInjection)); }
public async void DeleteOrder(Order order) { await using var ctx = new ContextManager(_optionsBuilder.Options); ctx.Order.Remove(order); await ctx.SaveChangesAsync(); }
public User GetUserById(Guid?id) { using var ctx = new ContextManager(_optionsBuilder.Options); return(ctx.User.FirstOrDefault(k => k.Id.Equals(id))); }
public ModesLogic(ContextManager contextManager) { context = contextManager.Context; }
public void ImportTable(Microsoft.Office.Interop.Excel.Range eRange) { ContextManager contextMgr = new ContextManager(); contextMgr.ImportPdeTable(eRange, Wkl.MainCtrl.CommonCtrl.CommonProfile.ActiveDoc); }
public SecurityInstallationsLogic(ContextManager contextManager) { context = contextManager.Context; }
public ContractorTypesLogic(ContextManager contextManager) { context = contextManager.Context; }
public void initContext() { contextManager = new ContextManager(this); }
public ControllerBase() { Context = new ContextManager(); }
public SessionRepository() { _unitOfWork = new UnitOfWork(ContextManager.BuildContext(RelationalConfig.Build())); _parameters = new Dictionary <string, object>(); }
public async Task <Order> GetOrderById(Guid?id) { await using var ctx = new ContextManager(_optionsBuilder.Options); return(await ctx.Order.Include(o => o.KrapfenOrder).FirstOrDefaultAsync(k => k.Id.Equals(id))); }
public BackgroundUpdateService(ContextManager contextManager) { _contextManager = contextManager; _timer = new DispatcherTimer(); _timer.Tick += TimerOnTickAsync; }
public async Task <List <Order> > GetAllOrders() { await using var ctx = new ContextManager(_optionsBuilder.Options); return(await ctx.Order.Include(o => o.KrapfenOrder).ToListAsync()); }
public WareDiscountsLogic(ContextManager contextManager) { context = contextManager.Context; }
public void InvalidConnectionSetting_Throws_ConfigurationErrorsException_for_LinqToSqlContextDataContext() { using (var objectContextManager = ContextManager <TestLinqToSqlContextDataContext> .GetManager(InvalidTestDBConnection, true)) { } }
private void EvaluateFieldsSemantic(API api, ContextManager context_manager) { throw new NotImplementedException(); }
public DebugViewModel(ContextManager contextManager, IAppVersionProvider appVersionProvider) { InitializeDispatcherFromCurrentThread(); ContextManager = contextManager; _appVersionProvider = appVersionProvider; }
public static void AddCategory(string categoryName) { ContextManager.AddCategory(categoryName); }
public static void AddAnswer(string answerName, int questionId, int weightId) { ContextManager.AddAnswer(answerName, questionId, weightId); }
public OperationContextTests() { ContextManager.GlobalContainer = new DependencyContainerDouble(this.ChildContainerCreatedCallback); ContextManager.SetContextStore(new CallContextStoreDouble()); }
public static int GetWeightIdByValue(int weightValue) { int weightId = ContextManager.GetWeightIdByValue(weightValue); return(weightId); }
public override void Walk(PythonWalker walker) { ContextManager?.Walk(walker); Variable?.Walk(walker); }
public static bool UpdateTaskStatusById(int taskId, int statusId) { return(ContextManager.UpdateTaskStatusById(taskId, statusId)); }
/// <summary> /// Clears all context collections. /// </summary> public static void Clear() { SetContext(null, null); ContextManager.SetLocalContext(null); }
public static void DeleteTask(int taskId) { TaskSet task = ContextManager.GetTaskById(taskId); ContextManager.DeleteTask(task); }
/// <summary> /// Occurs when a document is opened. (Inherited from ApplicationEvents4_Event.) /// 1. Check Pronto document. If correct go to 2 /// 2. Check bookmark. If incorrect go to 3 /// 3. Re-contructor documet and re-open /// </summary> /// <param name="Doc"></param> private void ThisDocument_DocumentOpen(Word.Document Doc) { string pdwrExtension = FileExtension.Pdwr; // 1. verify this document is comming from web server or no if (Doc.FullName.Contains("/") && Doc.FullName.ToLower().EndsWith(pdwrExtension)) { Application.Visible = true; } if (Application.Visible) { ContextManager contextManager = new ContextManager(); if (Doc.FullName.ToLower().EndsWith(pdwrExtension)) { Application.ScreenUpdating = false; List <string> tempFiles = new List <string>(); try { contextManager.OpenPdwr(Doc, ref tempFiles); } catch (BaseException baseExp) { ManagerException mgrExp = new ManagerException(ErrorCode.ipe_OpenPdwrError); mgrExp.Errors.Add(baseExp); LogUtils.LogManagerError(mgrExp); } catch (Exception ex) { ManagerException mgrExp = new ManagerException(ErrorCode.ipe_OpenPdwrError, MessageUtils.Expand(Properties.Resources.ipe_OpenPdwrError, ex.Message), ex.StackTrace); LogUtils.LogManagerError(mgrExp); } ClosePdwrFileDelegate closePdwrFile = new ClosePdwrFileDelegate(ClosePdwrFile); closePdwrFile.BeginInvoke(Doc, tempFiles, null, null); if (Application.Documents.Count == 0 || (Application.Documents.Count == 1 && Application.ActiveDocument.FullName == Doc.FullName)) { ((Word._Application)Application).Quit(); } } else { try { contextManager.OpenDocument(Doc); } catch (BaseException baseExp) { ManagerException mgrExp = new ManagerException(ErrorCode.ipe_OpenDocumentError); mgrExp.Errors.Add(baseExp); LogUtils.LogManagerError(mgrExp); } catch (Exception ex) { ManagerException mgrExp = new ManagerException(ErrorCode.ipe_OpenDocumentError, MessageUtils.Expand(Properties.Resources.ipe_OpenDocumentError, ex.Message), ex.StackTrace); LogUtils.LogManagerError(mgrExp); } } } }
public static int GetStatusIdByName(string statusName) { return(ContextManager.GetStatusIdByName(statusName)); }
public void ImportChart(Microsoft.Office.Interop.Excel.Chart eChart) { ContextManager contextMgr = new ContextManager(); contextMgr.ImportPdeChart(eChart, Wkl.MainCtrl.CommonCtrl.CommonProfile.ActiveDoc); }
public static void AddQuestion(string questionName, int categoryId) { ContextManager.AddQuestion(questionName, categoryId); }
public List <User> GetAllUser() { using var ctx = new ContextManager(_optionsBuilder.Options); return(ctx.User.ToList()); }
public static int AddTaskCategory(int taskId, int categoryId) { return(ContextManager.AddTaskCategory(taskId, categoryId)); }
public void Setup() { CM = ContextSystem.Manager; CM.RegisterCustomContextImplementation(typeof(TestContextImpl), typeof(ITestContext)); }
public static void AddCategoryQuestionAnswer(int taskCategoryId, int questionId, int answerId, int multiplierId, int score) { ContextManager.AddCategoryQuestionAnswer(taskCategoryId, questionId, answerId, multiplierId, score); }
public DataManager(ContextManager contextManager, CoreDomainContext coreDomainContext) { ContextManager = contextManager; _coreDomainContext = coreDomainContext; _domainContextHasChangesHelper = _domainContextHasChangesSubject.ToProperty(this, x => x.DomainContextHasChanges); _domainContextIsSubmittingHelper = _domainContextIsSubmittingSubject.ToProperty(this, x => x.DomainContextIsSubmitting); //Keep track of domain context changes and domain context is submitting every quarter second (and update this public properties) Observable.Interval(TimeSpan.FromMilliseconds(250)).ObserveOnDispatcher().Subscribe(_ => { _domainContextHasChangesSubject.OnNext(this.DomainContext.HasChanges); _domainContextIsSubmittingSubject.OnNext(this.DomainContext.IsSubmitting); }); SetupConsolidatedSubmit(); }
public static void UpdateTotalScore(int taskId, int totalScore) { ContextManager.UpdateTotalScore(taskId, totalScore); }
public static void LoadSystemConfig() { Execution.initInstrumentation(); DataFlow = new DataFlowManager(); Elements = new ElementManager(); Nodes = new NodeManager(); OutputControllers = new OutputControllerManager( new ControllerLinkingManagement<OutputController>(), new OutputDeviceCollection<OutputController>(), new OutputDeviceExecution<OutputController>()); SmartOutputControllers = new SmartOutputControllerManager( new ControllerLinkingManagement<SmartOutputController>(), new OutputDeviceCollection<SmartOutputController>(), new OutputDeviceExecution<SmartOutputController>()); Previews = new PreviewManager( new OutputDeviceCollection<OutputPreview>(), new OutputDeviceExecution<OutputPreview>()); Contexts = new ContextManager(); Filters = new FilterManager(DataFlow); ControllerLinking = new ControllerLinker(); ControllerManagement = new ControllerFacade(); ControllerManagement.AddParticipant(OutputControllers); ControllerManagement.AddParticipant(SmartOutputControllers); OutputDeviceManagement = new OutputDeviceFacade(); OutputDeviceManagement.AddParticipant(OutputControllers); OutputDeviceManagement.AddParticipant(SmartOutputControllers); OutputDeviceManagement.AddParticipant(Previews); // Load system data in order of dependency. // The system data generally resides in the data branch, but it // may not be in the case of an alternate context. string systemDataPath = _GetSystemDataPath(); // Load module data before system config. // System config creates objects that use modules that have data in the store. ModuleStore = _LoadModuleStore(systemDataPath) ?? new ModuleStore(); SystemConfig = _LoadSystemConfig(systemDataPath) ?? new SystemConfig(); Elements.AddElements(SystemConfig.Elements); Nodes.AddNodes(SystemConfig.Nodes); OutputControllers.AddRange(SystemConfig.OutputControllers.Cast<OutputController>()); SmartOutputControllers.AddRange(SystemConfig.SmartOutputControllers.Cast<SmartOutputController>()); Previews.AddRange(SystemConfig.Previews.Cast<OutputPreview>()); ControllerLinking.AddRange(SystemConfig.ControllerLinking); Filters.AddRange(SystemConfig.Filters); DataFlow.Initialize(SystemConfig.DataFlow); }
public static bool DeleteFileByGuid(Guid fileGuid) { return(ContextManager.DeleteFileByGuid(fileGuid)); }