Skip to content

Commit

Permalink
#113 - expose IMethod.IsInitOnly
Browse files Browse the repository at this point in the history
  • Loading branch information
NeVeSpl committed Mar 23, 2024
1 parent d25b13c commit 797550a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions NTypewriter.CodeModel.Roslyn/Method.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ internal sealed class Method : SymbolBase, IMethod
public IEnumerable<IParameter> Parameters => ParameterCollection.Create(symbol);
public IType ReturnType => Type.Create(symbol.ReturnType);
public bool IsAsync => symbol.IsAsync;
public bool IsInitOnly => symbol.IsInitOnly;
public bool IsOverride => symbol.IsOverride;
public bool IsSealed => symbol.IsSealed;

Expand Down
5 changes: 5 additions & 0 deletions NTypewriter.CodeModel/IMethod.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ public interface IMethod : ISymbolBase
/// </summary>
bool IsAsync { get; }

/// <summary>
/// Returns true for 'init' set accessors, and false otherwise.
/// </summary>
bool IsInitOnly { get; }

/// <summary>
/// Determines if the method is generic (it has any type parameters)
/// </summary>
Expand Down

0 comments on commit 797550a

Please sign in to comment.