mirror of https://github.com/icsharpcode/ILSpy.git
24 changed files with 579 additions and 4707 deletions
@ -0,0 +1,34 @@
@@ -0,0 +1,34 @@
|
||||
// Copyright (c) 2011 AlphaSierraPapa for the SharpDevelop Team
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
// software and associated documentation files (the "Software"), to deal in the Software
|
||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all copies or
|
||||
// substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System; |
||||
|
||||
namespace ICSharpCode.ILSpy |
||||
{ |
||||
[ExportMainMenuCommand(Menu = "_File", Header = "Open _List", MenuIcon = "Images/AssemblyList.png", MenuCategory = "Open", MenuOrder = 1.7)] |
||||
sealed class OpenListCommand : SimpleCommand |
||||
{ |
||||
public override void Execute(object parameter) |
||||
{ |
||||
OpenListDialog dlg = new OpenListDialog(); |
||||
dlg.Owner = MainWindow.Instance; |
||||
if (dlg.ShowDialog() == true) |
||||
MainWindow.Instance.ShowAssemblyList(dlg.SelectedListName); |
||||
} |
||||
} |
||||
} |
@ -0,0 +1,24 @@
@@ -0,0 +1,24 @@
|
||||
<Window |
||||
x:Class="ICSharpCode.ILSpy.CreateListDialog" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:controls="clr-namespace:ICSharpCode.ILSpy.Controls" |
||||
Title="New list" |
||||
Style="{DynamicResource DialogWindow}" |
||||
WindowStartupLocation="CenterOwner" |
||||
ResizeMode="NoResize" |
||||
Width="300" |
||||
Height="150" |
||||
FocusManager.FocusedElement="{Binding ElementName=listView}"> |
||||
<Grid Margin="12,8"> |
||||
<Grid.RowDefinitions> |
||||
<RowDefinition Height="Auto" /> |
||||
<RowDefinition Height="Auto" /> |
||||
</Grid.RowDefinitions> |
||||
<StackPanel> |
||||
<Label>Enter a list name:</Label> |
||||
<TextBox Margin="8,8" Name="ListName" TextChanged="TextBox_TextChanged"></TextBox> |
||||
</StackPanel> |
||||
<StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right" Margin="8,0"> |
||||
<Button IsDefault="True" Margin="2,0" IsEnabled="False" Name="okButton" Click="OKButton_Click">Create</Button> |
||||
<Button IsCancel="True" Margin="2,0">Cancel</Button> |
||||
</StackPanel> |
||||
</Grid> |
||||
</Window> |
@ -0,0 +1,49 @@
@@ -0,0 +1,49 @@
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using System.Linq; |
||||
using System.Text; |
||||
using System.Windows; |
||||
using System.Windows.Controls; |
||||
using System.Windows.Data; |
||||
using System.Windows.Documents; |
||||
using System.Windows.Input; |
||||
using System.Windows.Media; |
||||
using System.Windows.Media.Imaging; |
||||
using System.Windows.Navigation; |
||||
using System.Windows.Shapes; |
||||
|
||||
namespace ICSharpCode.ILSpy |
||||
{ |
||||
/// <summary>
|
||||
/// Interaction logic for Create.xaml
|
||||
/// </summary>
|
||||
public partial class CreateListDialog : Window |
||||
{ |
||||
public CreateListDialog() |
||||
{ |
||||
InitializeComponent(); |
||||
} |
||||
|
||||
private void TextBox_TextChanged(object sender, TextChangedEventArgs e) |
||||
{ |
||||
okButton.IsEnabled = !string.IsNullOrWhiteSpace(ListName.Text); |
||||
} |
||||
|
||||
private void OKButton_Click(object sender, RoutedEventArgs e) |
||||
{ |
||||
if (!string.IsNullOrWhiteSpace(ListName.Text)) |
||||
{ |
||||
this.DialogResult = true; |
||||
} |
||||
} |
||||
|
||||
public string NewListName |
||||
{ |
||||
get |
||||
{ |
||||
return ListName.Text; |
||||
} |
||||
} |
||||
|
||||
} |
||||
} |
@ -0,0 +1,41 @@
@@ -0,0 +1,41 @@
|
||||
<Window |
||||
x:Class="ICSharpCode.ILSpy.OpenListDialog" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:controls="clr-namespace:ICSharpCode.ILSpy.Controls" |
||||
Title="Open List" |
||||
Style="{DynamicResource DialogWindow}" |
||||
WindowStartupLocation="CenterOwner" |
||||
ResizeMode="CanResizeWithGrip" |
||||
MinWidth="380" |
||||
MinHeight="250" |
||||
Height="350" |
||||
Width="380" |
||||
FocusManager.FocusedElement="{Binding ElementName=listView}"> |
||||
<Grid Margin="12,8"> |
||||
<Grid.RowDefinitions> |
||||
<RowDefinition Height="Auto" /> |
||||
<RowDefinition Height="1*" /> |
||||
<RowDefinition Height="Auto" /> |
||||
</Grid.RowDefinitions> |
||||
<StackPanel> |
||||
<Label>Select a list:</Label> |
||||
</StackPanel> |
||||
<ListView Name="listView" Grid.Row="1" Margin="0, 8" controls:SortableGridViewColumn.SortMode="Automatic" SelectionChanged="ListView_SelectionChanged" |
||||
Loaded="listView_Loaded" SelectionMode="Single"> |
||||
<ListView.View> |
||||
<GridView> |
||||
<controls:SortableGridViewColumn x:Name="nameColumn" Header="Name" DisplayMemberBinding="{Binding .}" /> |
||||
</GridView> |
||||
</ListView.View> |
||||
</ListView> |
||||
<DockPanel Grid.Row="2"> |
||||
<StackPanel DockPanel.Dock="Right" Orientation="Horizontal" HorizontalAlignment="Right"> |
||||
<Button IsDefault="True" Margin="2,0" IsEnabled="False" Name="okButton" Click="OKButton_Click">Open</Button> |
||||
<Button IsCancel="True" Margin="2,0">Cancel</Button> |
||||
</StackPanel> |
||||
|
||||
<StackPanel DockPanel.Dock="Left" Orientation="Horizontal" HorizontalAlignment="Left"> |
||||
<Button Margin="2,0" Click="CreateButton_Click">Create</Button> |
||||
<Button Margin="2,0" IsEnabled="False" Name="removeButton" Click="RemoveButton_Click">Remove</Button> |
||||
</StackPanel> |
||||
</DockPanel> |
||||
</Grid> |
||||
</Window> |
@ -0,0 +1,184 @@
@@ -0,0 +1,184 @@
|
||||
// Copyright (c) 2011 AlphaSierraPapa for the SharpDevelop Team
|
||||
//
|
||||
// Permission is hereby granted, free of charge, to any person obtaining a copy of this
|
||||
// software and associated documentation files (the "Software"), to deal in the Software
|
||||
// without restriction, including without limitation the rights to use, copy, modify, merge,
|
||||
// publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons
|
||||
// to whom the Software is furnished to do so, subject to the following conditions:
|
||||
//
|
||||
// The above copyright notice and this permission notice shall be included in all copies or
|
||||
// substantial portions of the Software.
|
||||
//
|
||||
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
|
||||
// INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
||||
// PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE
|
||||
// FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
|
||||
// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
|
||||
// DEALINGS IN THE SOFTWARE.
|
||||
|
||||
using System.Windows; |
||||
using System.Windows.Controls; |
||||
using Mono.Cecil; |
||||
|
||||
namespace ICSharpCode.ILSpy |
||||
{ |
||||
/// <summary>
|
||||
/// Interaction logic for OpenListDialog.xaml
|
||||
/// </summary>
|
||||
public partial class OpenListDialog : Window |
||||
{ |
||||
|
||||
public const string DotNet4List = ".NET 4 (WPF)"; |
||||
public const string DotNet35List = ".NET 3.5"; |
||||
public const string ASPDotNetMVC3List = "ASP.NET (MVC3)"; |
||||
|
||||
AssemblyListManager manager; |
||||
|
||||
public OpenListDialog() |
||||
{ |
||||
InitializeComponent(); |
||||
manager = MainWindow.Instance.assemblyListManager; |
||||
} |
||||
|
||||
private void listView_Loaded(object sender, RoutedEventArgs e) |
||||
{ |
||||
listView.ItemsSource = manager.AssemblyLists; |
||||
CreateDefaultAssemblyLists(); |
||||
} |
||||
|
||||
void ListView_SelectionChanged(object sender, SelectionChangedEventArgs e) |
||||
{ |
||||
okButton.IsEnabled = listView.SelectedItem != null; |
||||
removeButton.IsEnabled = listView.SelectedItem != null; |
||||
} |
||||
|
||||
void OKButton_Click(object sender, RoutedEventArgs e) |
||||
{ |
||||
this.DialogResult = true; |
||||
} |
||||
|
||||
public string SelectedListName |
||||
{ |
||||
get |
||||
{ |
||||
return listView.SelectedItem.ToString(); |
||||
} |
||||
} |
||||
|
||||
private void CreateDefaultAssemblyLists() |
||||
{ |
||||
if (!manager.AssemblyLists.Contains(DotNet4List)) |
||||
{ |
||||
AssemblyList dotnet4 = new AssemblyList(DotNet4List); |
||||
AddToList(dotnet4, "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"); |
||||
AddToList(dotnet4, "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"); |
||||
AddToList(dotnet4, "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"); |
||||
AddToList(dotnet4, "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"); |
||||
AddToList(dotnet4, "System.Data.DataSetExtensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"); |
||||
AddToList(dotnet4, "System.Xaml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"); |
||||
AddToList(dotnet4, "System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"); |
||||
AddToList(dotnet4, "System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"); |
||||
AddToList(dotnet4, "Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"); |
||||
AddToList(dotnet4, "PresentationCore, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"); |
||||
AddToList(dotnet4, "PresentationFramework, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"); |
||||
AddToList(dotnet4, "WindowsBase, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"); |
||||
|
||||
if (dotnet4.assemblies.Count > 0) |
||||
{ |
||||
manager.CreateList(dotnet4); |
||||
} |
||||
} |
||||
|
||||
if (!manager.AssemblyLists.Contains(DotNet35List)) |
||||
{ |
||||
AssemblyList dotnet35 = new AssemblyList(DotNet35List); |
||||
AddToList(dotnet35, "mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"); |
||||
AddToList(dotnet35, "System, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"); |
||||
AddToList(dotnet35, "System.Core, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"); |
||||
AddToList(dotnet35, "System.Data, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"); |
||||
AddToList(dotnet35, "System.Data.DataSetExtensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"); |
||||
AddToList(dotnet35, "System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"); |
||||
AddToList(dotnet35, "System.Xml.Linq, Version=3.5.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"); |
||||
AddToList(dotnet35, "PresentationCore, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"); |
||||
AddToList(dotnet35, "PresentationFramework, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"); |
||||
AddToList(dotnet35, "WindowsBase, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"); |
||||
|
||||
if (dotnet35.assemblies.Count > 0) |
||||
{ |
||||
manager.CreateList(dotnet35); |
||||
} |
||||
} |
||||
|
||||
if (!manager.AssemblyLists.Contains(ASPDotNetMVC3List)) |
||||
{ |
||||
AssemblyList mvc = new AssemblyList(ASPDotNetMVC3List); |
||||
AddToList(mvc, "mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"); |
||||
AddToList(mvc, "System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"); |
||||
AddToList(mvc, "System.ComponentModel.DataAnnotations, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"); |
||||
AddToList(mvc, "System.Configuration, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"); |
||||
AddToList(mvc, "System.Core, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"); |
||||
AddToList(mvc, "System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"); |
||||
AddToList(mvc, "System.Data.DataSetExtensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"); |
||||
AddToList(mvc, "System.Data.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"); |
||||
AddToList(mvc, "System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"); |
||||
AddToList(mvc, "System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"); |
||||
AddToList(mvc, "System.Web, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"); |
||||
AddToList(mvc, "System.Web.Abstractions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"); |
||||
AddToList(mvc, "System.Web.ApplicationServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"); |
||||
AddToList(mvc, "System.Web.DynamicData, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"); |
||||
AddToList(mvc, "System.Web.Entity, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"); |
||||
AddToList(mvc, "System.Web.Extensions, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"); |
||||
AddToList(mvc, "System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"); |
||||
AddToList(mvc, "System.Web.Routing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"); |
||||
AddToList(mvc, "System.Web.Services, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"); |
||||
AddToList(mvc, "System.Web.WebPages, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"); |
||||
AddToList(mvc, "System.Web.Helpers, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35"); |
||||
AddToList(mvc, "System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"); |
||||
AddToList(mvc, "System.Xml.Linq, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"); |
||||
AddToList(mvc, "Microsoft.CSharp, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a"); |
||||
|
||||
if (mvc.assemblies.Count > 0) |
||||
{ |
||||
manager.CreateList(mvc); |
||||
} |
||||
} |
||||
} |
||||
|
||||
private void AddToList(AssemblyList list, string FullName) |
||||
{ |
||||
AssemblyNameReference reference = AssemblyNameReference.Parse(FullName); |
||||
string file = GacInterop.FindAssemblyInNetGac(reference); |
||||
if (file != null) |
||||
list.OpenAssembly(file); |
||||
} |
||||
|
||||
private void CreateButton_Click(object sender, RoutedEventArgs e) |
||||
{ |
||||
CreateListDialog dlg = new CreateListDialog(); |
||||
dlg.Owner = this; |
||||
dlg.Closing += (s, args) => |
||||
{ |
||||
if (dlg.DialogResult == true) |
||||
{ |
||||
if (manager.AssemblyLists.Contains(dlg.NewListName)) |
||||
{ |
||||
args.Cancel = true; |
||||
MessageBox.Show("A list with the same name was found.", null, MessageBoxButton.OK); |
||||
} |
||||
} |
||||
}; |
||||
if (dlg.ShowDialog() == true) |
||||
{ |
||||
manager.CreateList(new AssemblyList(dlg.NewListName)); |
||||
} |
||||
|
||||
} |
||||
|
||||
private void RemoveButton_Click(object sender, RoutedEventArgs e) |
||||
{ |
||||
if (listView.SelectedItem != null) |
||||
manager.DeleteList(listView.SelectedItem.ToString()); |
||||
} |
||||
|
||||
} |
||||
} |
@ -1,92 +0,0 @@
@@ -1,92 +0,0 @@
|
||||
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under MIT X11 license (for details please see \doc\license.txt)
|
||||
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using ICSharpCode.NRefactory.VB.Ast; |
||||
|
||||
namespace ICSharpCode.NRefactory.VB.AstBuilder |
||||
{ |
||||
/// <summary>
|
||||
/// Extension methods for NRefactory.Dom.Expression.
|
||||
/// </summary>
|
||||
public static class ExpressionBuilder |
||||
{/* |
||||
public static SimpleNameExpression Identifier(string identifier) |
||||
{ |
||||
return new SimpleNameExpression(identifier); |
||||
} |
||||
|
||||
public static MemberReferenceExpression Member(this Expression targetObject, string memberName) |
||||
{ |
||||
if (targetObject == null) |
||||
throw new ArgumentNullException("targetObject"); |
||||
return new MemberReferenceExpression(targetObject, memberName); |
||||
} |
||||
|
||||
public static InvocationExpression Call(this Expression callTarget, string methodName, params Expression[] arguments) |
||||
{ |
||||
if (callTarget == null) |
||||
throw new ArgumentNullException("callTarget"); |
||||
return Call(Member(callTarget, methodName), arguments); |
||||
} |
||||
|
||||
public static InvocationExpression Call(this Expression callTarget, params Expression[] arguments) |
||||
{ |
||||
if (callTarget == null) |
||||
throw new ArgumentNullException("callTarget"); |
||||
if (arguments == null) |
||||
throw new ArgumentNullException("arguments"); |
||||
return new InvocationExpression(callTarget, new List<Expression>(arguments)); |
||||
} |
||||
|
||||
public static ObjectCreateExpression New(this TypeReference createType, params Expression[] arguments) |
||||
{ |
||||
if (createType == null) |
||||
throw new ArgumentNullException("createType"); |
||||
if (arguments == null) |
||||
throw new ArgumentNullException("arguments"); |
||||
return new ObjectCreateExpression(createType, new List<Expression>(arguments)); |
||||
} |
||||
|
||||
public static Expression CreateDefaultValueForType(TypeReference type) |
||||
{ |
||||
if (type != null && !type.IsArrayType) { |
||||
switch (type.Type) { |
||||
case "System.SByte": |
||||
case "System.Byte": |
||||
case "System.Int16": |
||||
case "System.UInt16": |
||||
case "System.Int32": |
||||
case "System.UInt32": |
||||
case "System.Int64": |
||||
case "System.UInt64": |
||||
case "System.Single": |
||||
case "System.Double": |
||||
return new PrimitiveExpression(0, "0"); |
||||
case "System.Char": |
||||
return new PrimitiveExpression('\0', "'\\0'"); |
||||
case "System.Object": |
||||
case "System.String": |
||||
return new PrimitiveExpression(null, "null"); |
||||
case "System.Boolean": |
||||
return new PrimitiveExpression(false, "false"); |
||||
default: |
||||
return new DefaultValueExpression(type); |
||||
} |
||||
} else { |
||||
return new PrimitiveExpression(null, "null"); |
||||
} |
||||
} |
||||
|
||||
/// <summary>
|
||||
/// Just calls the BinaryOperatorExpression constructor,
|
||||
/// but being an extension method; this allows for a nicer
|
||||
/// infix syntax in some cases.
|
||||
/// </summary>
|
||||
public static BinaryOperatorExpression Operator(this Expression left, BinaryOperatorType op, Expression right) |
||||
{ |
||||
return new BinaryOperatorExpression(left, op, right); |
||||
}*/ |
||||
} |
||||
} |
@ -1,55 +0,0 @@
@@ -1,55 +0,0 @@
|
||||
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
|
||||
// This code is distributed under MIT X11 license (for details please see \doc\license.txt)
|
||||
|
||||
using System; |
||||
using System.Collections.Generic; |
||||
using ICSharpCode.NRefactory.VB.Ast; |
||||
|
||||
namespace ICSharpCode.NRefactory.VB.AstBuilder |
||||
{ |
||||
/// <summary>
|
||||
/// Extension methods for NRefactory.Dom.Expression.
|
||||
/// </summary>
|
||||
// public static class StatementBuilder
|
||||
// {
|
||||
// public static void AddStatement(this BlockStatement block, Statement statement)
|
||||
// {
|
||||
// if (block == null)
|
||||
// throw new ArgumentNullException("block");
|
||||
// if (statement == null)
|
||||
// throw new ArgumentNullException("statement");
|
||||
// block.AddChild(statement);
|
||||
// statement.Parent = block;
|
||||
// }
|
||||
//
|
||||
// public static void AddStatement(this BlockStatement block, Expression expressionStatement)
|
||||
// {
|
||||
// if (expressionStatement == null)
|
||||
// throw new ArgumentNullException("expressionStatement");
|
||||
// AddStatement(block, new ExpressionStatement(expressionStatement));
|
||||
// }
|
||||
//
|
||||
// public static void Throw(this BlockStatement block, Expression expression)
|
||||
// {
|
||||
// if (expression == null)
|
||||
// throw new ArgumentNullException("expression");
|
||||
// AddStatement(block, new ThrowStatement(expression));
|
||||
// }
|
||||
//
|
||||
// public static void Return(this BlockStatement block, Expression expression)
|
||||
// {
|
||||
// if (expression == null)
|
||||
// throw new ArgumentNullException("expression");
|
||||
// AddStatement(block, new ReturnStatement(expression));
|
||||
// }
|
||||
//
|
||||
// public static void Assign(this BlockStatement block, Expression left, Expression right)
|
||||
// {
|
||||
// if (left == null)
|
||||
// throw new ArgumentNullException("left");
|
||||
// if (right == null)
|
||||
// throw new ArgumentNullException("right");
|
||||
// AddStatement(block, new AssignmentExpression(left, AssignmentOperatorType.Assign, right));
|
||||
// }
|
||||
// }
|
||||
} |
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in new issue