internal static ImageInfo GetImageInfo(MethodDef method, BackgroundType bgType) { return(FieldTreeNode.GetImageInfo(GetMemberIcon(method), bgType)); }
CreateFieldDefCommand(TypeTreeNode ownerNode, FieldDefOptions options) { this.ownerNode = ownerNode; this.fieldNode = new FieldTreeNode(options.CreateFieldDef(ownerNode.TypeDefinition.Module)); }
public static ImageSource GetIcon(MethodDef method, BackgroundType bgType) { return(FieldTreeNode.GetIcon(GetMemberIcon(method), bgType)); }
public void Restore(FieldTreeNode[] nodes) { Debug.Assert(infos != null); if (infos == null) throw new InvalidOperationException(); Debug.Assert(infos.Length == nodes.Length); if (infos.Length != nodes.Length) throw new InvalidOperationException(); for (int i = infos.Length - 1; i >= 0; i--) { var node = nodes[i]; var info = infos[i]; info.OwnerType.Fields.Insert(info.FieldIndex, node.FieldDefinition); } infos = null; }
FieldDefSettingsCommand(FieldTreeNode fieldNode, FieldDefOptions options) { this.fieldNode = fieldNode; this.newOptions = options; this.origOptions = new FieldDefOptions(fieldNode.FieldDefinition); this.origParentNode = (ILSpyTreeNode)fieldNode.Parent; this.origParentChildIndex = this.origParentNode.Children.IndexOf(fieldNode); Debug.Assert(this.origParentChildIndex >= 0); if (this.origParentChildIndex < 0) throw new InvalidOperationException(); this.nameChanged = origOptions.Name != newOptions.Name; if (this.nameChanged) this.memberRefInfos = RefFinder.FindMemberRefsToThisModule(ILSpyTreeNode.GetModule(fieldNode)).Where(a => RefFinder.FieldEqualityComparerInstance.Equals(a, fieldNode.FieldDefinition)).Select(a => new MemberRefInfo(a)).ToArray(); }
DeleteFieldDefCommand(FieldTreeNode[] fieldNodes) { this.nodes = new DeletableNodes<FieldTreeNode>(fieldNodes); }
public void Delete(FieldTreeNode[] nodes) { Debug.Assert(infos == null); if (infos != null) throw new InvalidOperationException(); infos = new ModelInfo[nodes.Length]; for (int i = 0; i < infos.Length; i++) { var node = nodes[i]; var info = new ModelInfo(node.FieldDefinition); infos[i] = info; info.OwnerType.Fields.RemoveAt(info.FieldIndex); } }
public static ImageSource GetIcon(PropertyDef property, BackgroundType bgType) { return FieldTreeNode.GetIcon(GetMemberIcon(property), bgType); }
internal static ImageInfo GetImageInfo(PropertyDef property, BackgroundType bgType) { return FieldTreeNode.GetImageInfo(GetMemberIcon(property), bgType); }
internal static ImageInfo GetImageInfo(EventDef eventDef, BackgroundType bgType) { return(FieldTreeNode.GetImageInfo(GetMemberIcon(eventDef), bgType)); }
public static ImageSource GetIcon(EventDef eventDef, BackgroundType bgType) { return(FieldTreeNode.GetIcon(GetMemberIcon(eventDef), bgType)); }
FieldDefSettingsCommand(FieldTreeNode fieldNode, FieldDefOptions options) { this.fieldNode = fieldNode; this.newOptions = options; this.origOptions = new FieldDefOptions(fieldNode.FieldDefinition); this.origParentNode = (ILSpyTreeNode)fieldNode.Parent; this.origParentChildIndex = this.origParentNode.Children.IndexOf(fieldNode); Debug.Assert(this.origParentChildIndex >= 0); if (this.origParentChildIndex < 0) throw new InvalidOperationException(); this.nameChanged = origOptions.Name != newOptions.Name; }