Inheritance: MonoBehaviour
 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));
 }
示例#3
0
		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));
 }
示例#5
0
 public async void DeleteOrder(Order order)
 {
     await using var ctx = new ContextManager(_optionsBuilder.Options);
     ctx.Order.Remove(order);
     await ctx.SaveChangesAsync();
 }
示例#6
0
 public User GetUserById(Guid?id)
 {
     using var ctx = new ContextManager(_optionsBuilder.Options);
     return(ctx.User.FirstOrDefault(k => k.Id.Equals(id)));
 }
示例#7
0
 public ModesLogic(ContextManager contextManager)
 {
     context = contextManager.Context;
 }
示例#8
0
            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;
 }
示例#10
0
 public ContractorTypesLogic(ContextManager contextManager)
 {
     context = contextManager.Context;
 }
示例#11
0
 public void initContext()
 {
     contextManager = new ContextManager(this);
 }
示例#12
0
 public ControllerBase()
 {
     Context = new ContextManager();
 }
 public SessionRepository()
 {
     _unitOfWork = new UnitOfWork(ContextManager.BuildContext(RelationalConfig.Build()));
     _parameters = new Dictionary <string, object>();
 }
示例#14
0
 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;
 }
示例#16
0
 public async Task <List <Order> > GetAllOrders()
 {
     await using var ctx = new ContextManager(_optionsBuilder.Options);
     return(await ctx.Order.Include(o => o.KrapfenOrder).ToListAsync());
 }
示例#17
0
 public WareDiscountsLogic(ContextManager contextManager)
 {
     context = contextManager.Context;
 }
示例#18
0
 public void InvalidConnectionSetting_Throws_ConfigurationErrorsException_for_LinqToSqlContextDataContext()
 {
     using (var objectContextManager = ContextManager <TestLinqToSqlContextDataContext> .GetManager(InvalidTestDBConnection, true))
     {
     }
 }
示例#19
0
 private void EvaluateFieldsSemantic(API api, ContextManager context_manager)
 {
     throw new NotImplementedException();
 }
示例#20
0
 public DebugViewModel(ContextManager contextManager, IAppVersionProvider appVersionProvider)
 {
     InitializeDispatcherFromCurrentThread();
     ContextManager = contextManager;
     _appVersionProvider = appVersionProvider;
 }
示例#21
0
 public static void AddCategory(string categoryName)
 {
     ContextManager.AddCategory(categoryName);
 }
示例#22
0
 public static void AddAnswer(string answerName, int questionId, int weightId)
 {
     ContextManager.AddAnswer(answerName, questionId, weightId);
 }
示例#23
0
 public OperationContextTests()
 {
     ContextManager.GlobalContainer = new DependencyContainerDouble(this.ChildContainerCreatedCallback);
     ContextManager.SetContextStore(new CallContextStoreDouble());
 }
示例#24
0
        public static int GetWeightIdByValue(int weightValue)
        {
            int weightId = ContextManager.GetWeightIdByValue(weightValue);

            return(weightId);
        }
示例#25
0
 public override void Walk(PythonWalker walker)
 {
     ContextManager?.Walk(walker);
     Variable?.Walk(walker);
 }
示例#26
0
 public static bool UpdateTaskStatusById(int taskId, int statusId)
 {
     return(ContextManager.UpdateTaskStatusById(taskId, statusId));
 }
示例#27
0
 /// <summary>
 /// Clears all context collections.
 /// </summary>
 public static void Clear()
 {
     SetContext(null, null);
     ContextManager.SetLocalContext(null);
 }
示例#28
0
        public static void DeleteTask(int taskId)
        {
            TaskSet task = ContextManager.GetTaskById(taskId);

            ContextManager.DeleteTask(task);
        }
示例#29
0
        /// <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);
                    }
                }
            }
        }
示例#30
0
 public static int GetStatusIdByName(string statusName)
 {
     return(ContextManager.GetStatusIdByName(statusName));
 }
示例#31
0
            public void ImportChart(Microsoft.Office.Interop.Excel.Chart eChart)
            {
                ContextManager contextMgr = new ContextManager();

                contextMgr.ImportPdeChart(eChart, Wkl.MainCtrl.CommonCtrl.CommonProfile.ActiveDoc);
            }
示例#32
0
 public static void AddQuestion(string questionName, int categoryId)
 {
     ContextManager.AddQuestion(questionName, categoryId);
 }
示例#33
0
 public List <User> GetAllUser()
 {
     using var ctx = new ContextManager(_optionsBuilder.Options);
     return(ctx.User.ToList());
 }
示例#34
0
 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));
 }
示例#36
0
 public static void AddCategoryQuestionAnswer(int taskCategoryId, int questionId, int answerId, int multiplierId, int score)
 {
     ContextManager.AddCategoryQuestionAnswer(taskCategoryId, questionId, answerId, multiplierId, score);
 }
示例#37
0
        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();
        }
示例#38
0
 public static void UpdateTotalScore(int taskId, int totalScore)
 {
     ContextManager.UpdateTotalScore(taskId, totalScore);
 }
示例#39
0
        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);
        }
示例#40
0
 public static bool DeleteFileByGuid(Guid fileGuid)
 {
     return(ContextManager.DeleteFileByGuid(fileGuid));
 }