Browse Source

Remove some unused members

ast-source-generator
Siegfried Pammer 3 months ago
parent
commit
1a1980a04c
  1. 29
      ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ArrayInitializerExpression.cs
  2. 9
      ICSharpCode.Decompiler/CSharp/Syntax/Role.cs
  3. 2
      ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/EntityDeclaration.cs

29
ICSharpCode.Decompiler/CSharp/Syntax/Expressions/ArrayInitializerExpression.cs

@ -34,18 +34,6 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -34,18 +34,6 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
[DecompilerAstNode(hasNullNode: true, hasPatternPlaceholder: true)]
public partial class ArrayInitializerExpression : Expression
{
/// <summary>
/// For ease of use purposes in the resolver the ast representation
/// of { a, b, c } is { {a}, {b}, {c} }.
/// If IsSingleElement is true then this array initializer expression is a generated one.
/// That has no meaning in the source code (and contains no brace tokens).
/// </summary>
public virtual bool IsSingleElement {
get {
return false;
}
}
public ArrayInitializerExpression()
{
}
@ -77,23 +65,6 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -77,23 +65,6 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
ArrayInitializerExpression o = other as ArrayInitializerExpression;
return o != null && this.Elements.DoMatch(o.Elements, match);
}
public static ArrayInitializerExpression CreateSingleElementInitializer()
{
return new SingleArrayInitializerExpression();
}
/// <summary>
/// Single elements in array initializers are represented with this special class.
/// </summary>
class SingleArrayInitializerExpression : ArrayInitializerExpression
{
public override bool IsSingleElement {
get {
return true;
}
}
}
}
}

9
ICSharpCode.Decompiler/CSharp/Syntax/Role.cs

@ -88,15 +88,6 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -88,15 +88,6 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
return node is T;
}
[Obsolete("Use the other overload explicitly specifying the nullObject.")]
public Role(string name)
{
if (name == null)
throw new ArgumentNullException(nameof(name));
this.name = name;
this.nullObject = null!;
}
public Role(string name, T nullObject)
{
this.name = name ?? throw new ArgumentNullException(nameof(name));

2
ICSharpCode.Decompiler/CSharp/Syntax/TypeMembers/EntityDeclaration.cs

@ -16,6 +16,7 @@ @@ -16,6 +16,7 @@
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
// DEALINGS IN THE SOFTWARE.
using System;
using System.Collections.Generic;
using System.Linq;
@ -33,6 +34,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax @@ -33,6 +34,7 @@ namespace ICSharpCode.Decompiler.CSharp.Syntax
get { return NodeType.Member; }
}
[Obsolete]
public abstract SymbolKind SymbolKind { get; }
public AstNodeCollection<AttributeSection> Attributes {

Loading…
Cancel
Save