Пример #1
0
 internal ClosedContext(IClosedContextClr2Java clr2java)
 {
     Id = clr2java.GetId();
     EvaluatorId = clr2java.GetEvaluatorId();
     EvaluatorDescriptor = clr2java.GetEvaluatorDescriptor();
     _parentContext = clr2java.GetParentContext() == null ? null : new ActiveContext(clr2java.GetParentContext());
 }
Пример #2
0
 /// <summary>
 /// Access the context the task ran (and crashed) on, if it could be recovered.
 /// An ActiveContext is given when the task fails but the context remains alive.
 /// On context failure, the context also fails and is surfaced via the FailedContext event.
 /// Note that receiving an ActiveContext here is no guarantee that the context (and evaluator)
 /// are in a consistent state. Application developers need to investigate the reason available
 /// via getCause() to make that call.
 /// return the context the Task ran on.
 /// </summary>
 public Optional<IActiveContext> GetActiveContext()
 {
     IActiveContext activeContext = new ActiveContext(ActiveContextClr2Java);
     return ActiveContextClr2Java == null ? Optional<IActiveContext>.Empty() : Optional<IActiveContext>.Of(activeContext);
 }
Пример #3
0
        /// <summary>
        /// Access the context the task ran (and crashed) on, if it could be recovered.
        /// An ActiveContext is given when the task fails but the context remains alive.
        /// On context failure, the context also fails and is surfaced via the FailedContext event.
        /// Note that receiving an ActiveContext here is no guarantee that the context (and evaluator)
        /// are in a consistent state. Application developers need to investigate the reason available
        /// via getCause() to make that call.
        /// return the context the Task ran on.
        /// </summary>
        public Optional <IActiveContext> GetActiveContext()
        {
            IActiveContext activeContext = new ActiveContext(ActiveContextClr2Java);

            return(ActiveContextClr2Java == null ? Optional <IActiveContext> .Empty() : Optional <IActiveContext> .Of(activeContext));
        }