Skip to content
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

Request - Property internal set vs public flag or filter #113

Closed
jons-bakerhill opened this issue Mar 21, 2024 · 3 comments
Closed

Request - Property internal set vs public flag or filter #113

jons-bakerhill opened this issue Mar 21, 2024 · 3 comments
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@jons-bakerhill
Copy link

Is there an equivalent to Symbols.ThatArePublic that could be used to check if a property has a public vs internal or private setter? I didn't see anything on https://github.com/NeVeSpl/NTypewriter/blob/master/NTypewriter.CodeModel/ISymbolBase.cs

@NeVeSpl
Copy link
Owner

NeVeSpl commented Mar 21, 2024

I assume that IPropertySymbol.IsReadOnly is not what you need? I do not know how that happened, but only minimal info about properties is exposed, and even unit tests are missing for what is already exposed. These shortcomings will definitely need to be corrected.

@NeVeSpl NeVeSpl self-assigned this Mar 21, 2024
@NeVeSpl NeVeSpl added the enhancement New feature or request label Mar 21, 2024
@jons-bakerhill
Copy link
Author

Even when setting the setter to private IsReadOnly is still false and ThatArePublic still includes it. E.g.
public Guid? ForeignId { get; private set; }

@NeVeSpl
Copy link
Owner

NeVeSpl commented Mar 21, 2024

The next release will contain IProperty.GetMethod, IProperty.SetMethod and all access modifiers available on ISymbolBase.

@NeVeSpl NeVeSpl added this to the 0.5.8 milestone Mar 22, 2024
NeVeSpl added a commit that referenced this issue Mar 23, 2024
NeVeSpl added a commit that referenced this issue Mar 23, 2024
…lBase.IsInternal, ISymbolBase.IsProtectedInternal, ISymbolBase.IsPrivateProtected,
@NeVeSpl NeVeSpl closed this as completed Mar 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants