mirror of https://github.com/icsharpcode/ILSpy.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
66 lines
1.4 KiB
66 lines
1.4 KiB
using System; |
|
using System.Collections.Generic; |
|
using System.ComponentModel; |
|
using System.Runtime.CompilerServices; |
|
using System.Text; |
|
|
|
namespace ICSharpCode.Decompiler.IL |
|
{ |
|
public class ILAstWritingOptions : INotifyPropertyChanged |
|
{ |
|
private bool useLogicOperationSugar; |
|
private bool useFieldSugar; |
|
private bool showILRanges; |
|
|
|
/// <summary> |
|
/// Sugar for logic.not/and/or. |
|
/// </summary> |
|
public bool UseLogicOperationSugar { |
|
get { return useLogicOperationSugar; } |
|
set { |
|
if (useLogicOperationSugar != value) { |
|
useLogicOperationSugar = value; |
|
OnPropertyChanged(); |
|
} |
|
} |
|
} |
|
|
|
/// <summary> |
|
/// Sugar for ldfld/stfld. |
|
/// </summary> |
|
public bool UseFieldSugar { |
|
get { return useFieldSugar; } |
|
set { |
|
if (useFieldSugar != value) { |
|
useFieldSugar = value; |
|
OnPropertyChanged(); |
|
} |
|
} |
|
} |
|
|
|
/// <summary> |
|
/// Show IL ranges in ILAst output. |
|
/// </summary> |
|
public bool ShowILRanges { |
|
get { return showILRanges; } |
|
set { |
|
if (showILRanges != value) { |
|
showILRanges = value; |
|
OnPropertyChanged(); |
|
} |
|
} |
|
} |
|
|
|
protected virtual void OnPropertyChanged([CallerMemberName] string propertyName = null) |
|
{ |
|
OnPropertyChanged(new PropertyChangedEventArgs(propertyName)); |
|
} |
|
|
|
protected virtual void OnPropertyChanged(PropertyChangedEventArgs e) |
|
{ |
|
PropertyChanged?.Invoke(this, e); |
|
} |
|
|
|
public event PropertyChangedEventHandler PropertyChanged; |
|
} |
|
}
|
|
|