-
Notifications
You must be signed in to change notification settings - Fork 216
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modifications in order to make multiple classes become public #310
Modifications in order to make multiple classes become public #310
Conversation
a041819
to
5d160a1
Compare
af9c744
to
f6d193a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The framework for these types of changes is as follows:
- transition the class from internal to public
- transition back all items from the class that were marked as public to internal (and do not need to be public for the current GEH task)
This way we will many more code changes but less functional/interface ones
src/UiPath.Workflow.Runtime/Runtime/CompletionCallbackWrapper.cs
Outdated
Show resolved
Hide resolved
@@ -12,7 +12,7 @@ namespace System.Activities; | |||
using Runtime; | |||
using Validation; | |||
|
|||
internal static class ActivityUtilities |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there are still some methods public here, do you need them all?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CacheRootMetadata
must remain public in order to not break reflection implementation in other projects.
We use CreateFaultBookmark(FaultCallback onFaulted, ActivityInstance owningInstance)
& CreateCompletionBookmark(CompletionCallback onCompleted, ActivityInstance owningInstance)
directly so they need to remain public
.
Overloads of CreateCompletionBookmark
were left also public
.
@@ -1158,18 +1158,18 @@ internal override void OnInternalCacheMetadata(bool createEmptyBindings) | |||
|
|||
public struct ChildActivity : IEquatable<ChildActivity> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
make only ChildActivity internal, and all items in it can remain unchanged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CacheRootMetadata
method needs to be public
. For this to happen ProcessActivityCallback
needs to be public
which implies that ChildActivity
and ActivityCallStack
needs to be both public.
@@ -1184,18 +1184,18 @@ public class ActivityCallStack | |||
private int _nonExecutingParentCount; | |||
private readonly Quack<ChildActivity> _callStack; | |||
|
|||
public ActivityCallStack() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
change ActivityCallStack to internal and all items in it can remain unchanged
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Explained in ChildActivity
comment the situation.
53a08bc
to
54107c0
Compare
@@ -0,0 +1,12 @@ | |||
using System.Activities.Runtime; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we don't need to expose these methods for the current PR on Studio, but they might be useful to replace the reflection used for exception handler at some point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed this class. Fixed.
{ | ||
private bool _checkForCancelation; | ||
private bool _needsToGatherOutputs; | ||
|
||
protected CompletionCallbackWrapper(Delegate callback, ActivityInstance owningInstance) | ||
public CompletionCallbackWrapper(Delegate callback, ActivityInstance owningInstance) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This change doesn't do anything since it's an abstract class.
protected rather than public is better from a readability perspective.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted the constructor back to protected. Fixed.
…lizable json properties.
…stanceStore public." This reverts commit 68a521f.
… to be compatible with GEH Json Persistence requirements.
…ssActivityTreeOptions class to be public.
… CallbackWrapper, CompletionCallbackWrapper, FaultCallbackWrapper, CompletionBookmark and FaultBookmark classes.
…tionCallbackWrapper, FaultCallbackWrapper, CompletionBookmark and FaultBookmark classes.
…, CompletionCallbackWrapper, FaultCallbackWrapper, CompletionBookmark and FaultBookmark classes." This reverts commit 232b841.
… the ActivityUtilities class FinishCachingSubtree & ProcessActivityInstanceTree methods.
…o public the ActivityUtilities class FinishCachingSubtree & ProcessActivityInstanceTree methods." This reverts commit 8f7665a.
…CompletionBookmark methods of ActivityUtilities static class.
b668ca5
to
31a6123
Compare
public ActivityInstance ActivityInstance | ||
public Delegate Callback { get; set; } | ||
|
||
internal ActivityInstance ActivityInstance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is accessed with reflexion. are we sure we did not break it?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted ActivityInstance property to be public.
@@ -4,7 +4,7 @@ | |||
namespace System.Activities.Runtime; | |||
|
|||
[DataContract] | |||
internal class CompletionBookmark | |||
public class CompletionBookmark |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you still need this to be public?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Reverted to internal.
@@ -7,7 +7,7 @@ namespace System.Activities.Runtime; | |||
[KnownType(typeof(ActivityCompletionCallbackWrapper))] | |||
[KnownType(typeof(DelegateCompletionCallbackWrapper))] | |||
[DataContract] | |||
internal abstract class CompletionCallbackWrapper : CallbackWrapper | |||
public abstract class CompletionCallbackWrapper : CallbackWrapper |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you still need this to be public?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Reverted to internal.
@@ -4,7 +4,7 @@ | |||
namespace System.Activities.Runtime; | |||
|
|||
[DataContract] | |||
internal class FaultBookmark | |||
public class FaultBookmark |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do you still need this to be public?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed. Reverted to internal.
…per classes to be internal.
private ActivityInstance _activityInstance; | ||
|
||
protected internal CallbackWrapper() { } | ||
|
||
public CallbackWrapper(Delegate callback, ActivityInstance owningInstance) | ||
{ | ||
ActivityInstance = owningInstance; | ||
_callback = callback; | ||
Callback = callback; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The rename of the backing field is also a risk.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added back backing field _callback.
@@ -56,13 +55,13 @@ internal string SerializedDeclaringTypeName | |||
} | |||
|
|||
[DataMember(Name = "ActivityInstance")] | |||
internal ActivityInstance SerializedActivityInstance | |||
public ActivityInstance SerializedActivityInstance |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this needed as public?
Please go through the PRs again, making sure every change can be justified.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Reverted SerializedActivityInstance property to be internal, because isn't used anywhere in our repo.
…e get and set methods that operate on the _callback backing field. Reverted the usages in the class tto _callback. Reverted SerializedActivityInstance property to be internal. Reverted ActivityInstance property to be public.
@@ -19,19 +19,19 @@ public CompletionBookmark(CompletionCallbackWrapper callbackWrapper) | |||
} | |||
|
|||
[DataMember(EmitDefaultValue = false, Name = "callbackWrapper")] | |||
internal CompletionCallbackWrapper SerializedCallbackWrapper | |||
public CompletionCallbackWrapper SerializedCallbackWrapper |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes to this file are no longer needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
@@ -35,7 +35,7 @@ internal bool SerializedNeedsToGatherOutputs | |||
set => _needsToGatherOutputs = value; | |||
} | |||
|
|||
public void CheckForCancelation() => _checkForCancelation = true; | |||
internal void CheckForCancelation() => _checkForCancelation = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes to this file are no longer needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
@@ -14,12 +14,12 @@ public FaultBookmark(FaultCallbackWrapper callbackWrapper) | |||
} | |||
|
|||
[DataMember(Name = "callbackWrapper")] | |||
internal FaultCallbackWrapper SerializedCallbackWrapper |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changes to this file are no longer needed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed.
…tBookmark.cs files.
No description provided.