-
Notifications
You must be signed in to change notification settings - Fork 0
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
Prevent code execution in Directives ctor's #135
Conversation
@Meerownymous |
…Add only additional ctor
public Directives(String text) : this(Directives.Parse(text)) | ||
/// <param name="xambly">Xambly script</param> | ||
public Directives(IText xambly) : this( | ||
new StickyScalar<ICollection<IDirective>>(() => |
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.
should be a Solid to ensure threadsafeness.
/// <param name="items">list to instantiate from</param> | ||
public ThreadsafeCollection(IEnumerable<T> items) | ||
{ | ||
if (items == null) |
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.
code execution in ctor
/// <param name="items">list to instantiate from</param> | ||
public ThreadsafeCollection(IEnumerable<T> items) | ||
{ | ||
if (items == null) |
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.
ctor should be placed in a lock statement
Closed due to inactivity. |
Please check if the PR fulfills these requirements
What kind of change does this PR introduce?** (check one with "x")
What is the current behavior? (You can also link to an open issue here)
close #133
What is the new behavior?
Directives()
ctor'sDoes this PR introduce a breaking change? (check one with "x")
If this PR contains a breaking change, please describe the impact and migration path for existing applications
Other information