public void ProcessItemElement(string rootDirectory, ProjectItemElement itemElement, bool conditionResult) { LazyItemOperation operation = null; if (itemElement.IncludeLocation != null) { operation = BuildIncludeOperation(rootDirectory, itemElement, conditionResult); } else if (itemElement.RemoveLocation != null) { operation = BuildRemoveOperation(rootDirectory, itemElement, conditionResult); } else if (itemElement.UpdateLocation != null) { operation = BuildUpdateOperation(rootDirectory, itemElement, conditionResult); } else { ErrorUtilities.ThrowInternalErrorUnreachable(); } LazyItemList previousItemList = GetItemList(itemElement.ItemType); LazyItemList newList = new LazyItemList(previousItemList, operation); _itemLists[itemElement.ItemType] = newList; }
public void ProcessItemElement(string rootDirectory, ProjectItemElement itemElement, bool conditionResult) { LazyItemOperation operation = null; if (itemElement.IncludeLocation != null) { operation = BuildIncludeOperation(rootDirectory, itemElement, conditionResult); } else if (itemElement.RemoveLocation != null) { operation = BuildRemoveOperation(rootDirectory, itemElement); } else if (itemElement.UpdateLocation != null) { operation = BuildUpdateOperation(rootDirectory, itemElement); } else { throw new NotImplementedException(); } LazyItemList previousItemList = GetItemList(itemElement.ItemType); LazyItemList newList = new LazyItemList(previousItemList, operation); _itemLists[itemElement.ItemType] = newList; }
public LazyItemList(LazyItemList previous, LazyItemOperation operation) { _previous = previous; _memoizedOperation = new MemoizedOperation(operation); }
public LazyItemList(LazyItemList previous, LazyItemOperation operation) { _previous = previous; _operation = operation; }
public MemoizedOperation(LazyItemOperation operation) { Operation = operation; }