Skip to content

Instantly share code, notes, and snippets.

@abock

abock/foo.diff Secret

Created October 14, 2017 05:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save abock/7bbefbaf033516f49f6c3731acb445c7 to your computer and use it in GitHub Desktop.
Save abock/7bbefbaf033516f49f6c3731acb445c7 to your computer and use it in GitHub Desktop.
diff --git a/Agents/Xamarin.Interactive/API/Xamarin.Interactive.api.cs b/Agents/Xamarin.Interactive/API/Xamarin.Interactive.api.cs
index 950929fb..5fd94c10 100644
--- a/Agents/Xamarin.Interactive/API/Xamarin.Interactive.api.cs
+++ b/Agents/Xamarin.Interactive/API/Xamarin.Interactive.api.cs
@@ -64,6 +64,10 @@ namespace Xamarin.Interactive
get;
}
+ void PublishEvaluationResult (Guid evaluationId, object result, EvaluationResultHandling resultHandling = EvaluationResultHandling.Replace);
+
+ void RegisterEvaluationContextHandler (Action<IEvaluationContext> handler);
+
void RegisterResetStateHandler (Action handler);
}
public interface IAgentIntegration
@@ -81,6 +85,42 @@ namespace Xamarin.Interactive
SynchronizationContext PushContext (SynchronizationContext context);
}
}
+namespace Xamarin.Interactive.Evaluation
+{
+ public enum EvaluationPhase
+ {
+ None,
+ Compiled,
+ Evaluated,
+ Represented,
+ Completed
+ }
+ public enum EvaluationResultHandling
+ {
+ Replace,
+ Append
+ }
+ public interface IEvaluation
+ {
+ Guid Id {
+ get;
+ }
+
+ EvaluationPhase Phase {
+ get;
+ }
+
+ object Result {
+ get;
+ }
+ }
+ public interface IEvaluationContext
+ {
+ IObservable<IEvaluation> Evaluations {
+ get;
+ }
+ }
+}
namespace Xamarin.Interactive.Logging
{
public static class Log
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment