cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Annotations\IFloatingAnnotation.cs (1)
26ModelItem ModelItem
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Base\Interaction\Model\ModelItemDictionary.cs (57)
54public abstract ModelItem this[ModelItem key] { get; set; }
66public abstract ModelItem this[object key] { get; set; }
99public abstract ICollection<ModelItem> Keys { get; }
114public abstract ICollection<ModelItem> Values { get; }
127public abstract void Add(ModelItem key, ModelItem value);
138public abstract ModelItem Add(object key, object value);
151protected virtual void CopyTo(KeyValuePair<ModelItem, ModelItem>[] array, int arrayIndex) {
152foreach (KeyValuePair<ModelItem, ModelItem> kv in this) {
160protected virtual bool Contains(KeyValuePair<ModelItem, ModelItem> item) {
161ModelItem value;
170public abstract bool ContainsKey(ModelItem key);
183private static ModelItem ConvertType(object value) {
185return (ModelItem)value;
191"value", typeof(ModelItem).FullName)));
200public abstract IEnumerator<KeyValuePair<ModelItem, ModelItem>> GetEnumerator();
208public abstract bool Remove(ModelItem key);
225public abstract bool TryGetValue(ModelItem key, out ModelItem value);
234public abstract bool TryGetValue(object key, out ModelItem value);
243typeof(ModelItem),
301foreach (KeyValuePair<ModelItem, ModelItem> kv in this) {
323foreach (KeyValuePair<ModelItem, ModelItem> kv in this) {
355KeyValuePair<ModelItem, ModelItem>[] typedArray = new KeyValuePair<ModelItem, ModelItem>[len];
394foreach (KeyValuePair<ModelItem, ModelItem> kv in this) {
403void ICollection<KeyValuePair<ModelItem, ModelItem>>.Add(KeyValuePair<ModelItem, ModelItem> item) {
407bool ICollection<KeyValuePair<ModelItem, ModelItem>>.Contains(KeyValuePair<ModelItem, ModelItem> item) {
411void ICollection<KeyValuePair<ModelItem, ModelItem>>.CopyTo(KeyValuePair<ModelItem, ModelItem>[] array, int arrayIndex) {
421bool ICollection<KeyValuePair<ModelItem, ModelItem>>.Remove(KeyValuePair<ModelItem, ModelItem> item) {
422ModelItem value;
438private IEnumerator<KeyValuePair<ModelItem, ModelItem>> _real;
440internal DictionaryEnumerator(IEnumerator<KeyValuePair<ModelItem, ModelItem>> real) {
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Base\Interaction\Services\ModelChangeInfoImpl.cs (29)
14private ModelItem subject;
16private ModelItem key;
17private ModelItem oldValue;
18private ModelItem value;
20private ModelChangeInfoImpl(ModelChangeType modelChangeType, ModelItem subject, string propertyName, ModelItem key, ModelItem oldValue, ModelItem value)
35public override ModelItem Subject
45public override ModelItem Key
50public override ModelItem OldValue
55public override ModelItem Value
60public static ModelChangeInfoImpl CreatePropertyChanged(ModelItem subject, string propertyName, ModelItem oldValue, ModelItem newValue)
65public static ModelChangeInfoImpl CreateCollectionItemAdded(ModelItem subject, ModelItem item)
70public static ModelChangeInfoImpl CreateCollectionItemRemoved(ModelItem subject, ModelItem item)
75public static ModelChangeInfoImpl CreateDictionaryKeyValueAdded(ModelItem subject, ModelItem key, ModelItem value)
80public static ModelChangeInfoImpl CreateDictionaryKeyValueRemoved(ModelItem subject, ModelItem key, ModelItem value)
85public static ModelChangeInfoImpl CreateDictionaryValueChanged(ModelItem subject, ModelItem key, ModelItem oldValue, ModelItem newValue)
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Converters\ModelPropertyEntryToModelItemConverter.cs (16)
38ModelItem item = null;
39ModelItem propertyParentItem = null;
63ModelItem item = null;
64ModelItem propertyParentItem = null;
100void GetPropertyData(PropertyEntry property, out ModelItem activityItem, out ModelItem propertyParentItem, out EditingContext context)
102activityItem = (ModelItem)this.propertyEntryConverter.Convert(property, typeof(ModelItem), false, null);
103propertyParentItem = (ModelItem)this.propertyEntryConverter.Convert(property, typeof(ModelItem), true, null);
116ModelItem modelItem = null;
117ModelItem propertyParentItem = null;
146DependencyProperty.Register("ModelItem", typeof(ModelItem), typeof(Container), new UIPropertyMetadata(null));
157public Container(ModelItem item, EditingContext context, DependencyObject viewElement, PropertyValue value)
165public ModelItem ModelItem
167get { return (ModelItem)GetValue(ModelItemProperty); }
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\CutCopyPasteHelper.cs (25)
186List<ModelItem> modelItemsToCut = new List<ModelItem>(currentSelection.SelectedObjects);
190internal static void DoCut(List<ModelItem> modelItemsToCut, EditingContext context)
236List<ModelItem> modelItemsToCopy = new List<ModelItem>(currentSelection.SelectedObjects);
240private static void DoCopy(List<ModelItem> modelItemsToCopy, EditingContext context)
268static void CutCopyOperation(List<ModelItem> modelItemsToCutCopy, EditingContext context, bool isCutOperation)
276Dictionary<ICompositeView, List<ModelItem>> notifyDictionary = new Dictionary<ICompositeView, List<ModelItem>>();
278foreach (ModelItem modelItem in modelItemsToCutCopy)
309HashSet<ModelItem> parentModelItems = CutCopyPasteHelper.GetSelectableParentModelItems(modelItem);
315notifyDictionary[container] = new List<ModelItem>();
341foreach (ModelItem modelItem in notifyDictionary[container])
371internal static HashSet<ModelItem> GetSelectableParentModelItems(ModelItem modelItem)
378HashSet<ModelItem> parentModelItems = new HashSet<ModelItem>();
423ModelItem modelItem = context.Items.GetValue<Selection>().PrimarySelection;
436if (clipboardObjects.Count == 3 && clipboardObjects[1] is Func<ModelItem, object, object>)
438var factoryMethod = (Func<ModelItem, object, object>)clipboardObjects[1];
453static ICompositeView GetClickedContainer(ModelItem clickedModelItem, Point clickPoint)
476static ICompositeView GetContainerForPaste(ModelItem pasteModelItem, Point clickPoint)
566internal static void PutCallbackOnClipBoard(Func<ModelItem, object, object> callbackMethod, Type callbackResultType, object context)
702private static bool CanCopy(ModelItem item)
743ModelItem primarySelection = context.Items.GetValue<Selection>().PrimarySelection;
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Debugger\DebuggerService.cs (43)
28ModelItem selectedModelItem;
31ModelItem currentModelItem;
32ModelItem currentModelItemContext;
45Dictionary<ModelItem, SourceLocation> modelItemToSourceLocation;
46Dictionary<SourceLocation, ModelItem> sourceLocationToModelItem;
48Dictionary<ModelItem, BreakpointTypes> breakpoints; // The map contains breakpoint that has its ModelItem on the modelTree.
49Dictionary<ModelItem, BreakpointTypes> transientBreakpoints; // The map contains breakpoint that has its ModelItem not on the modelTree.
71this.modelItemToSourceLocation = new Dictionary<ModelItem, SourceLocation>();
72this.sourceLocationToModelItem = new Dictionary<SourceLocation, ModelItem>();
73this.breakpoints = new Dictionary<ModelItem, BreakpointTypes>();
75this.transientBreakpoints = new Dictionary<ModelItem, BreakpointTypes>();
113ModelItem previousModelItem = this.currentModelItem;
130ModelItem mi = this.GetModelItemFromSourceLocation(exactLocation, /* forceCreate */ true);
137void BringToViewCurrentLocation(ModelItem previousModelItem)
147void PostBringToViewCurrentLocation(ModelItem previousModelItem)
181ModelItem previousModelItem = this.currentModelItemContext;
237void BringToView(ModelItem modelItem)
298foreach (ModelItem removedModelItem in e.EditingScope.ItemsRemoved)
304private void DeleteModelItem(ModelItem modelItem)
331ModelItem modelItem;
341bool IsCurrentLocation(ModelItem modelItem)
347bool IsCurrentContext(ModelItem modelItem)
360void TryActivateUnmappedBreakpoint(SourceLocation sourceLocation, ModelItem modelItem)
378ModelItem modelItem = this.GetModelItemFromSourceLocation(unmappedLocation);
387bool IsBreakpointOfType(ModelItem modelItem, BreakpointTypes breakpointType)
399void SetBreakpointType(ModelItem modelItem, BreakpointTypes newBreakpointType)
538foreach (KeyValuePair<ModelItem, BreakpointTypes> entry in this.breakpoints)
566ModelItem modelItem = this.GetModelItemFromSourceLocation(sourceLocation);
601ModelItem[] oldModelItems = new ModelItem[this.breakpoints.Keys.Count];
607foreach (ModelItem modelItem in oldModelItems)
652ModelItem modelItem = this.modelTreeManager.GetModelItem(kvp.Key);
668ModelItem modelItem = this.modelTreeManager.GetModelItem(unresolvedObject);
686ModelItem modelItem = e.View.ModelItem;
732List<KeyValuePair<ModelItem, SourceLocation>> resolvedEntries = this.modelItemToSourceLocation.Where(entry => !IsUnresolved(entry.Value)).ToList();
733foreach (KeyValuePair<ModelItem, SourceLocation> resolvedEntry in resolvedEntries)
749foreach (ModelItem key in this.modelSearchService.GetObjectsWithSourceLocation())
800private void SetPropertyValue(ModelItem oldModelItem, AttachedProperty property, ModelItem newModelItem)
815private SourceLocation GetSourceLocationFromModelItem(ModelItem modelItem)
826private ModelItem GetModelItemFromSourceLocation(SourceLocation sourceLocation)
831private ModelItem GetModelItemFromSourceLocation(SourceLocation sourceLocation, bool forceCreate)
833ModelItem modelItem = null;
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\IExpandChild.cs (1)
11ModelItem ExpandedChild
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Model\ModelItemCollectionImpl.cs (52)
26List<ModelItem> modelItems;
27Dictionary<string, ModelItem> modelPropertyStore;
30List<ModelItem> parents;
34List<ModelItem> subTreeNodesThatNeedBackLinkPatching;
36ModelItem manuallySetParent;
38public ModelItemCollectionImpl(ModelTreeManager modelTreeManager, Type itemType, Object instance, ModelItem parent)
46this.parents = new List<ModelItem>(1);
53this.modelPropertyStore = new Dictionary<string, ModelItem>();
54this.subTreeNodesThatNeedBackLinkPatching = new List<ModelItem>();
55this.modelItems = new List<ModelItem>();
137public override ModelItem Parent
158public override ModelItem Root
182public override IEnumerable<ModelItem> Parents
188List<ModelItem> list = new List<ModelItem>();
209internal List<ModelItem> Items
217internal Dictionary<string, ModelItem> ModelPropertyStore
242ModelItem IModelTreeItem.ModelItem
250Dictionary<string, ModelItem> IModelTreeItem.ModelPropertyStore
267public override ModelItem this[int index]
284public override ModelItem Add(object value)
286ModelItem item = value as ModelItem;
299public override void Add(ModelItem item)
339ModelItem item = value as ModelItem;
347public override bool Contains(ModelItem item)
352public override void CopyTo(ModelItem[] array, int arrayIndex)
369public override IEnumerator<ModelItem> GetEnumerator()
371foreach (ModelItem modelItem in modelItems)
385IEnumerable<ModelItem> IModelTreeItem.ItemBackPointers
395void IModelTreeItem.SetParent(ModelItem dataModelItem)
421public override int IndexOf(ModelItem item)
430public override ModelItem Insert(int index, object value)
432ModelItem item = value as ModelItem;
445public override void Insert(int index, ModelItem item)
464ModelItem movingItem = this.Items[fromIndex];
471ModelItem item = value as ModelItem;
475foreach (ModelItem childItem in this.Items)
491public override bool Remove(ModelItem item)
508internal void AddCore(ModelItem item)
542List<ModelItem> modelItemsRemoved = new List<ModelItem>(this.modelItems);
545foreach (ModelItem item in modelItemsRemoved.Distinct())
560internal void InsertCore(int index, ModelItem item)
586internal void RemoveCore(ModelItem item)
619ModelItem item = this.modelItems[index];
646ModelItem modelItem = this.modelTreeManager.WrapAsModelItem(item);
657void IModelTreeItem.RemoveParent(ModelItem oldParent)
682void IModelTreeItem.RemoveSource(ModelItem parent, string propertyName)
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Model\ModelItemDictionaryImpl.cs (108)
26private NullableKeyDictionary<ModelItem, ModelItem> modelItems;
27internal ModelItem updateKeySavedValue;
28Dictionary<string, ModelItem> modelPropertyStore;
31List<ModelItem> parents;
35List<ModelItem> subTreeNodesThatNeedBackLinkPatching;
37ModelItem manuallySetParent;
40public ModelItemDictionaryImpl(ModelTreeManager modelTreeManager, Type itemType, Object instance, ModelItem parent)
48this.parents = new List<ModelItem>(1);
55this.modelPropertyStore = new Dictionary<string, ModelItem>();
56this.subTreeNodesThatNeedBackLinkPatching = new List<ModelItem>();
57this.modelItems = new NullableKeyDictionary<ModelItem, ModelItem>();
111ModelItem key = null;
114ModelItem value = this.WrapObject(valueObj);
122ModelItem newKey = null;
124ModelItem oldKey = null;
135ModelItem value = this.modelItems[oldKey];
157new KeyValuePair<ModelItem, ModelItem>(newKey, value),
158new KeyValuePair<ModelItem, ModelItem>(oldKey, value)));
178foreach (ModelItem item in e.NewItems)
180ModelItem key = item.Properties["Key"] == null ? null : item.Properties["Key"].Value;
181ModelItem value = item.Properties["Value"] == null ? null : item.Properties["Value"].Value;
187foreach (ModelItem item in e.OldItems)
190ModelItem key = null;
201foreach (ModelItem item in e.NewItems)
204ModelItem key = null;
207ModelItem value = item.Properties["Value"] == null ? null : item.Properties["Value"].Value;
237public override ICollection<ModelItem> Keys
242public override ICollection<ModelItem> Values
298public override ModelItem Parent
307public override ModelItem Root
337public ModelItem ModelItem
342public Dictionary<string, ModelItem> ModelPropertyStore
353public override IEnumerable<ModelItem> Parents
359List<ModelItem> list = new List<ModelItem>();
401public override ModelItem this[ModelItem key]
414ModelItem oldValue = null;
426public override ModelItem this[object key]
430ModelItem keyItem = null;
446ModelItem keyItem = null;
452public override void Add(ModelItem key, ModelItem value)
461public override ModelItem Add(object key, object value)
467ModelItem keyModelItem = key as ModelItem ?? this.WrapObject(key);
468ModelItem valueModelItem = value as ModelItem ?? this.WrapObject(value);
478public override bool ContainsKey(ModelItem key)
480return this.modelItems.Keys.Contains<ModelItem>(key);
485ModelItem keyItem = key as ModelItem;
495public override IEnumerator<KeyValuePair<ModelItem, ModelItem>> GetEnumerator()
500public override bool Remove(ModelItem key)
508ModelItem keyItem = null;
517public override bool TryGetValue(ModelItem key, out ModelItem value)
522public override bool TryGetValue(object key, out ModelItem value)
524ModelItem keyItem = null;
569void IModelTreeItem.SetParent(ModelItem dataModelItem)
602void IModelTreeItem.RemoveParent(ModelItem oldParent)
615IEnumerable<ModelItem> IModelTreeItem.ItemBackPointers
637void IModelTreeItem.RemoveSource(ModelItem parent, string propertyName)
651internal void EditCore(ModelItem key, ModelItem value)
656private void EditCore(ModelItem key, ModelItem value, bool updateInstance)
660ModelItem oldValue = this.modelItems[key];
676foreach (ModelItem item in ItemsCollectionModelItemCollection)
678ModelItem keyInCollection = item.Properties["Key"].Value;
727new KeyValuePair<ModelItem, ModelItem>(key, value),
728new KeyValuePair<ModelItem, ModelItem>(key, oldValue)));
737internal void AddCore(ModelItem key, ModelItem value)
742private void AddCore(ModelItem key, ModelItem value, bool updateInstance)
762ModelItem mutableKVPairItem = this.modelTreeManager.WrapAsModelItem(mutableKVPair);
790new KeyValuePair<ModelItem, ModelItem>(key, value)));
810IList removed = this.modelItems.ToList<KeyValuePair<ModelItem, ModelItem>>();
829List<ModelItem> removedItems = new List<ModelItem>(this.modelItems.Keys.Concat(this.modelItems.Values).Distinct());
832foreach (ModelItem item in removedItems.Distinct())
852internal void RemoveCore(ModelItem key)
857private bool IsInKeysOrValuesCollection(ModelItem modelItem)
859foreach (ModelItem item in this.modelItems.Keys)
867foreach (ModelItem item in this.modelItems.Values)
878private void RemoveCore(ModelItem key, bool updateInstance)
884ModelItem value = this.modelItems[key];
906ModelItem itemToBeRemoved = null;
907foreach (ModelItem item in itemsCollectionImpl)
909ModelItem keyInCollection = item.Properties["Key"].Value;
950new NotifyCollectionChangedEventArgs(NotifyCollectionChangedAction.Remove, new KeyValuePair<ModelItem, ModelItem>(key, value)));
967ModelItem key = (keyObject == null) ? null : this.WrapObject(keyObject);
968ModelItem value = this.WrapObject(instance.GetValueFromCurrent(current));
987ModelItem WrapObject(object value)
993private bool KeyAsModelItem(object value, bool createNew, out ModelItem keyModelItem)
995keyModelItem = value as ModelItem;
1002keyModelItem = this.modelItems.Keys.SingleOrDefault<ModelItem>(p =>
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Model\ModelItemExtensions.cs (77)
26public static EditingContext GetEditingContext(this ModelItem modelItem)
37internal static ModelItem FindParentModelItem(this ModelItem item, Type parentType)
48ModelItem result = null;
61internal static bool SwitchKeys(this ModelItemDictionary dictionary, ModelItem oldKey, ModelItem newKey)
82ModelItem value = dictionary[oldKey];
92internal static bool SwitchKeys(this ModelItemDictionary dictionary, object oldKey, object newKey, out ModelItem newKeyItem)
112if (typeof(ModelItem).IsAssignableFrom(oldKey.GetType()) && typeof(ModelItem).IsAssignableFrom(newKey.GetType()))
114result = SwitchKeys(dictionary, (ModelItem)oldKey, (ModelItem)newKey);
115newKeyItem = (ModelItem)newKey;
119if (typeof(ModelItem).IsAssignableFrom(oldKey.GetType()))
121oldKey = ((ModelItem)oldKey).GetCurrentValue();
127if (typeof(ModelItem).IsAssignableFrom(newKey.GetType()))
129newKey = ((ModelItem)newKey).GetCurrentValue();
138ModelItem value = dictionary[oldKey];
141newKeyItem = dictionary.Keys.First<ModelItem>(p => object.Equals(p.GetCurrentValue(), newKey));
149internal static bool TryGetPropertyValue(this ModelItem item, out ModelItemCollection value, params string[] path)
151ModelItem temp;
163internal static bool TryGetPropertyValue(this ModelItem item, out ModelItemDictionary value, params string[] path)
165ModelItem temp;
177internal static bool TryGetPropertyValue(this ModelItem item, out ModelItem value, params string[] path)
214internal static bool TrySetPropertyValue(this ModelItem item, object value, out ModelItem wrappedValue, params string[] path)
263internal static bool HasAnnotation(this ModelItem modelItem)
279public static string GetModelPath(this ModelItem modelItem)
287HashSet<ModelItem> visited = new HashSet<ModelItem>();
344public static ModelItem GetModelItemFromPath(string path, ModelItem root)
354ModelItem foundModelItem = null;
366ModelItem next = GetModelItemFromSegment(foundModelItem, segment);
387private static ModelItem GetModelItemFromSegment(ModelItem currentModelItem, string segment)
389ModelItem modelItemFromSegment = null;
432internal static IEnumerable<ModelItem> GetParentEnumerator(this ModelItem item)
437internal static IEnumerable<ModelItem> GetParentEnumerator(this ModelItem item, Func<ModelItem, bool> continueEnumerationPredicate)
455internal static string GetUniqueName(this ModelItemCollection collection, string nameDefaultPrefix, Func<ModelItem, string> nameGetter)
457return collection.GetUniqueName<ModelItem>(nameDefaultPrefix, nameGetter);
460internal static string GetUniqueName(this ModelItemDictionary dictionary, string nameDefaultPrefix, Func<ModelItem, string> nameGetter)
515internal static bool IsAssignableFrom<T>(this ModelItem item) where T : class
525internal static Activity GetRootActivity(this ModelItem item)
538public static bool IsParentOf(this ModelItem item, ModelItem child)
550child.GetParentEnumerator(p => { isParent = ModelItem.Equals(p, item); return !isParent; }).LastOrDefault();
554public static void Focus(this ModelItem item)
559internal static void Highlight(this ModelItem item)
564internal static void Highlight(this ModelItem item, Rect rectToBringIntoView)
569public static void Focus(this ModelItem item, int level)
582internal static ModelItem FindParent(this ModelItem item, Predicate<ModelItem> predicate)
584ModelItem parent = item.Parent;
598ModelItem itemToFocus;
606ModelItem[] itemsToExpand;
656Action<ModelItem> onElementFocusingDelegate;
661private ModelItemFocusHelper(ModelItem itemToFocus, int maxExpandLevel, bool shouldGetKeyboardFocus, Rect rectToBringIntoView)
674static bool IsRootedAt(ModelItem item, ModelItem root)
678ModelItem currentItem = item;
686public static void Focus(ModelItem itemToFocus, int maxExpandLevel)
691internal static void Focus(ModelItem itemToFocus, int maxExpandLevel, bool shouldGetKeyboardFocus)
696internal static void Focus(ModelItem itemToFocus, int maxExpandLevel, bool shouldGetKeyboardFocus, Rect rectToBringIntoView)
802this.itemsToExpand = visualItems.TakeWhile(p => firstVisibleItem != p).Concat(new ModelItem[] { firstVisibleItem }).ToArray();
820void Expand(ModelItem currentItem)
845if (!ModelItem.Equals(currentItem, this.itemsToExpand[index]))
857if (ModelItem.Equals(this.itemsToExpand[j], currentItem))
916var modelItem = (null != virtualContainer ? virtualContainer.ModelItem : (viewElement != null ? viewElement.ModelItem : null));
944.FirstOrDefault(p => ModelItem.Equals(this.itemToFocus, p.ModelItem) || p.ModelItem.IsParentOf(this.itemToFocus));
954void OnFocusElement(ModelItem currentItem)
1003ModelItem item = this.itemToFocus;
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Model\ModelSearchServiceImpl.cs (42)
47ModelItem lastNavigatedItem;
49ModelItem itemToFocus;
117IEnumerable<ModelItem> itemsToSearch = this.GetItemsOnDesigner(preOrder: true, excludeRoot: true, excludeErrorActivity: true, excludeExpression: true, includeOtherObjects: false);
118foreach (ModelItem item in itemsToSearch)
133foreach (ModelItem modelItem in itemsToSearch)
217internal IEnumerable<ModelItem> GetItemsOnDesigner(bool preOrder, bool excludeRoot, bool excludeErrorActivity, bool excludeExpression, bool includeOtherObjects)
220IList<ModelItem> items =
227delegate(ModelItem modelItem)
236IEnumerable<ModelItem> itemsToSearch = null;
239itemsToSearch = items.Where<ModelItem>(item => !ModelUtilities.IsModelItemKeyValuePair(item.ItemType)
244itemsToSearch = items.Where<ModelItem>(item =>
250itemsToSearch = itemsToSearch.Except<ModelItem>(new ModelItem[] { modelService.Root });
255static private bool IsErrorActivity(ModelItem item)
273ModelItem item, ModelProperty property, string text, string propertyPath)
286void AddEntriesForVariables(ModelItem modelItem)
291foreach (ModelItem variable in variables)
319private void AddEntriesForPropertyReference(string valueText, ModelItem modelItem,
325private void AddEntriesForPropertyValue(object value, ModelItem modelItem,
340void AddBrowsableProperties(ModelItem modelItem)
362ModelItem selectedArgument = this.GetTopmostSelectedArgument(selection, arguments);
363foreach (ModelItem argument in arguments)
395private ModelItem GetTopmostSelectedArgument(Selection selection, ModelItemCollection arguments)
397foreach (ModelItem argument in arguments)
399foreach (ModelItem candidateArgument in selection.SelectedObjects)
478void AddEntriesForProperty(ModelProperty property, ModelItem modelItem, string propertyPath)
532public ModelItem FindModelItem(int startLine, int startColumn, int endLine, int endColumn)
538public ModelItem FindModelItemOfViewState(int startLine, int startColumn, int endLine, int endColumn)
544public SourceLocation FindSourceLocation(ModelItem modelItem)
554private ModelItem FindModelItemForNavigate(int startLine, int startColumn, int endLine, int endColumn)
558ModelItem modelItem = this.FindModelItemOfViewState(startLine, startColumn, endLine, endColumn);
569ModelItem itemToFocus = this.FindModelItemForNavigate(startLine, startColumn, endLine, endColumn);
586public bool NavigateTo(ModelItem itemToFocus)
606private static SearchableEntry CreateSearchableEntryNoRecursive(ModelItem modelItem)
628private static SearchableEntry CreateSearchableEntryForArgumentOrVariable(ModelItem itemToFocus)
631ModelUtilities.ReverseTraverse(itemToFocus, (ModelItem modelItem) =>
701private bool ShouldShowSearchToolTip(ModelItem item)
707private void HighlightModelItem(ModelItem itemToFocus)
726private ModelItem FindModelItemToFocus(ModelItem itemToFocus)
734ModelUtilities.ReverseTraverse(itemToFocus, (ModelItem modelItem) =>
765private static bool CanFocusOnModelItem(ModelItem itemToFocus, WorkflowViewService viewService)
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Model\ModelService.cs (15)
34public abstract ModelItem Root { get; }
58protected abstract ModelItem CreateItem(Type itemType, CreateOptions options, params object[] arguments);
69protected abstract ModelItem CreateItem(object item);
83protected abstract ModelItem CreateStaticMemberItem(Type type, string memberName);
103public abstract IEnumerable<ModelItem> Find(ModelItem startingItem, Type type);
124public abstract IEnumerable<ModelItem> Find(ModelItem startingItem, Predicate<Type> match);
143public ModelItem FromName(ModelItem scope, string name) {
168public abstract ModelItem FromName(ModelItem scope, string name, StringComparison comparison);
174internal ModelItem InvokeCreateItem(Type itemType, CreateOptions options, params object[] arguments) {
181internal ModelItem InvokeCreateStaticMemberItem(Type type, string memberName) {
189internal ModelItem InvokeCreateItem(object item) {
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Model\ModelServiceImpl.cs (22)
30public override ModelItem Root
38public override IEnumerable<ModelItem> Find(ModelItem startingItem, Predicate<Type> match)
40return ModelTreeManager.Find(startingItem, delegate(ModelItem m) { return match(m.ItemType); }, false);
43public override IEnumerable<ModelItem> Find(ModelItem startingItem, Type type)
55return ModelTreeManager.Find(startingItem, delegate(ModelItem modelItem)
61public override ModelItem FromName(ModelItem scope, string name, StringComparison comparison)
68internal void OnModelItemAdded(ModelItem modelItem, ModelChangeInfo changeInfo)
74List<ModelItem> modelItemsAdded = new List<ModelItem>(1);
81internal void OnModelItemRemoved(ModelItem modelItem, ModelChangeInfo changInfo)
86List<ModelItem> modelItemsRemoved = new List<ModelItem>(1);
104internal void OnModelItemsRemoved(IEnumerable<ModelItem> modelItems)
109List<ModelItem> modelItemsRemoved = new List<ModelItem>();
130protected override ModelItem CreateItem(object instance)
135protected override ModelItem CreateItem(Type itemType, CreateOptions options, params object[] arguments)
141protected override ModelItem CreateStaticMemberItem(Type type, string memberName)
146internal ModelItem WrapAsModelItem(object instance)
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Model\ModelTreeManager.cs (134)
37ModelItem rootItem;
65public ModelItem Root
111public ModelItem CreateModelItem(ModelItem parent, object instance)
117ModelItem retval;
207ModelItem oldRoot = this.rootItem;
225ModelItem newValueModelItem = null;
238internal void CollectionAdd(ModelItemCollectionImpl dataModelItemCollection, ModelItem item)
243internal void CollectionInsert(ModelItemCollectionImpl dataModelItemCollection, int index, ModelItem item)
261List<ModelItem> removedItems = new List<ModelItem>();
265foreach (ModelItem modelItem in removedItems)
274internal void NotifyCollectionInsert(ModelItem item, ModelChangeInfo changeInfo)
279internal void CollectionRemove(ModelItemCollectionImpl dataModelItemCollection, ModelItem item)
286ModelItem item = dataModelItemCollection[index];
290private void CollectionRemove(ModelItemCollectionImpl dataModelItemCollection, ModelItem item, int index)
304internal void NotifyCollectionRemove(ModelItem item, ModelChangeInfo changeInfo)
313ModelItem[] keys = modelDictionary.Keys.ToArray<ModelItem>();
317foreach (ModelItem key in keys)
325internal void DictionaryEdit(ModelItemDictionaryImpl dataModelItemDictionary, ModelItem key, ModelItem newValue, ModelItem oldValue)
340internal void DictionaryAdd(ModelItemDictionaryImpl dataModelItemDictionary, ModelItem key, ModelItem value)
355internal void OnPropertyEdgeAdded(string propertyName, ModelItem from, ModelItem to)
360internal void OnItemEdgeAdded(ModelItem from, ModelItem to)
365internal void OnPropertyEdgeRemoved(string propertyName, ModelItem from, ModelItem to)
370internal void OnItemEdgeRemoved(ModelItem from, ModelItem to)
375internal void DictionaryRemove(ModelItemDictionaryImpl dataModelItemDictionary, ModelItem key)
379ModelItem value = dataModelItemDictionary[key];
392internal static IEnumerable<ModelItem> Find(ModelItem startingItem, Predicate<ModelItem> matcher, bool skipCollapsedAndUnrootable)
402Predicate<ModelItem> shouldSearchThroughProperties = (currentModelItem) => (!skipCollapsedAndUnrootable)
406List<ModelItem> foundItems = new List<ModelItem>();
407Queue<ModelItem> modelItems = new Queue<ModelItem>();
409HashSet<ModelItem> alreadyVisited = new HashSet<ModelItem>();
412ModelItem currentModelItem = modelItems.Dequeue();
423List<ModelItem> neighbors = GetNeighbors(currentModelItem, shouldSearchThroughProperties);
425foreach (ModelItem neighbor in neighbors)
438private static List<ModelItem> GetNeighbors(ModelItem currentModelItem, Predicate<ModelItem> extraShouldSearchThroughProperties)
440List<ModelItem> neighbors = new List<ModelItem>();
451foreach (ModelItem modelItem in collection)
464foreach (KeyValuePair<ModelItem, ModelItem> kvp in dictionary)
466ModelItem miKey = kvp.Key;
472ModelItem miValue = kvp.Value;
515internal static ModelItem FindFirst(ModelItem startingItem, Predicate<ModelItem> matcher)
520internal static ModelItem FindFirst(ModelItem startingItem, Predicate<ModelItem> matcher, Predicate<ModelItem> extraShouldSearchThroughProperties)
525ModelItem foundItem = null;
526Queue<ModelItem> modelItems = new Queue<ModelItem>();
528HashSet<ModelItem> alreadyVisited = new HashSet<ModelItem>();
531ModelItem currentModelItem = modelItems.Dequeue();
543List<ModelItem> neighbors = GetNeighbors(currentModelItem, extraShouldSearchThroughProperties);
545foreach (ModelItem neighbor in neighbors)
561internal ModelItem GetValue(ModelPropertyImpl dataModelProperty)
566ModelItem value;
590this.graphManager.OnPropertyEdgeAdded(dataModelProperty.Name, (ModelItem)parent, value);
597internal ModelItem SetValue(ModelPropertyImpl modelProperty, object value)
600ModelItem newValueModelItem = null;
605Dictionary<string, ModelItem> modelPropertyStore = ((IModelTreeItem)modelProperty.Parent).ModelPropertyStore;
606Dictionary<string, ModelItem> removedModelItems = new Dictionary<string, ModelItem>(modelPropertyStore);
609foreach (KeyValuePair<string, ModelItem> kvp in removedModelItems)
618if (value is ModelItem)
620newValueModelItem = (ModelItem)value;
723internal ModelItem WrapAsModelItem(object instance)
725ModelItem modelItem = GetModelItem(instance);
734internal ModelItem GetModelItem(object instance)
739public ModelItem GetModelItem(object instance, bool shouldExpandModelTree)
746ModelItem modelItem = null;
751modelItem = (ModelItem)mappedModelItem.Target;
862internal static IList<ModelItem> DepthFirstSearch(ModelItem currentItem, Predicate<Type> filter, Predicate<ModelItem> shouldTraverseSubTree, bool preOrder)
864IList<ModelItem> foundItems = new List<ModelItem>();
865HashSet<ModelItem> alreadyVisitedItems = new HashSet<ModelItem>();
870private static void RecursiveDepthFirstSearch(ModelItem currentItem, Predicate<Type> filter, Predicate<ModelItem> shouldTraverseSubTree, IList<ModelItem> foundItems, HashSet<ModelItem> alreadyVisitedItems, bool preOrder)
902List<ModelItem> neighbors = GetNeighbors(currentItem, (m) => true);
903foreach (ModelItem neighbor in neighbors)
920private void OnModelItemsAdded(IEnumerable<ModelItem> addedModelItems)
930private void OnModelItemsRemoved(IEnumerable<ModelItem> removedModelItems)
940internal class ModelGraphManager : GraphManager<ModelItem, Edge, BackPointer>
951public void OnPropertyEdgeAdded(string propertyName, ModelItem from, ModelItem to)
956public void OnItemEdgeAdded(ModelItem from, ModelItem to)
961public void OnPropertyEdgeRemoved(string propertyName, ModelItem from, ModelItem to)
966public void OnItemEdgeRemoved(ModelItem from, ModelItem to)
971public new void OnRootChanged(ModelItem oldRoot, ModelItem newRoot)
976protected override ModelItem Root
981protected override IEnumerable<ModelItem> GetVertices()
985ModelItem modelItem = weakReference.Target as ModelItem;
994protected override IEnumerable<Edge> GetOutEdges(ModelItem vertex)
1000foreach (KeyValuePair<string, ModelItem> kvp in ((IModelTreeItem)vertex).ModelPropertyStore)
1011foreach (ModelItem modelItem in collection.Distinct())
1023List<ModelItem> items = new List<ModelItem>(dictionary.Keys);
1026foreach (ModelItem modelItem in items.Distinct())
1038protected override IEnumerable<BackPointer> GetBackPointers(ModelItem vertex)
1042foreach (ModelItem parent in ((IModelTreeItem)vertex).ItemBackPointers)
1060protected override ModelItem GetDestinationVertexFromEdge(Edge edge)
1065protected override ModelItem GetSourceVertexFromEdge(Edge edge)
1070protected override ModelItem GetDestinationVertexFromBackPointer(BackPointer backPointer)
1121ModelItem from = edge.SourceVertex;
1171protected override void OnVerticesBecameReachable(IEnumerable<ModelItem> reachableVertices)
1177protected override void OnVerticesBecameUnreachable(IEnumerable<ModelItem> unreachableVertices)
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\DesignerView.xaml.cs (37)
58DependencyProperty.RegisterReadOnly("ActivitySchema", typeof(ModelItem), typeof(DesignerView), new UIPropertyMetadata(OnActivitySchemaChanged));
81Dictionary<ModelItem, ModelItem> selectionMap = new Dictionary<ModelItem, ModelItem>();
286public ModelItem ActivitySchema
288get { return (ModelItem)GetValue(ActivitySchemaProperty); }
419public void MakeRootDesigner(ModelItem modelItem)
429internal void MakeRootDesigner(ModelItem modelItem, bool setAsSelection)
434internal void ForceMakeRootDesigner(ModelItem modelItem)
442ModelItem rootModelItem = null;
450IEnumerable<ModelItem> items = ModelTreeManager.Find(rootModelItem, delegate(ModelItem current)
455IEnumerable<ModelItem> itemsToSelect = items
459.Where<ModelItem>(item => !ModelUtilities.IsModelItemKeyValuePair(item.ItemType) || ModelUtilities.IsSwitchCase(item))
460.Except<ModelItem>(new ModelItem[] { rootModelItem });
491static void UpdateAncestorFlag(ModelItem oldRoot, ModelItem newRoot)
507ModelItem parent = newRoot.Parent;
524ModelItem parent = oldRoot.Parent;
537internal void MakeRootDesigner(ModelItem modelItem, bool setAsSelection, bool checkIfCanBeMadeRoot)
539ModelItem currentRootModelItem = (this.RootDesigner != null) ? ((WorkflowViewElement)this.RootDesigner).ModelItem : null;
563Dictionary<ModelItem, ModelItem> newSelectionMap = new Dictionary<ModelItem, ModelItem>();
564ModelItem newRootModelItem = modelItem;
915if (null != listBoxItem && listBoxItem.Content is ModelItem)
924this.MakeRootDesigner((ModelItem)listBoxItem.Content);
1060void SetAsRootDesignerView(ModelItem root, bool setAsSelection)
1072ModelItem selection = root;
1075ModelItem prevSelection = selectionMap[root];
1357foreach (ModelItem item in selection.SelectedObjects)
1384var modelItemList = new List<ModelItem>();
1387ModelItem item = ModelItemExtensions.GetModelItemFromPath(path, modelTreeManager.Root);
1432ModelItem item = ModelItemExtensions.GetModelItemFromPath(path, modelTreeManager.Root);
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\IExpressionEditorService.cs (4)
17IExpressionEditorInstance CreateExpressionEditor(AssemblyContextControlItem assemblies, ImportedNamespaceContextItem importedNamespaces, List<ModelItem> variables, string text, Type expressionType);
18IExpressionEditorInstance CreateExpressionEditor(AssemblyContextControlItem assemblies, ImportedNamespaceContextItem importedNamespaces, List<ModelItem> variables, string text, Type expressionType, Size initialSize);
19IExpressionEditorInstance CreateExpressionEditor(AssemblyContextControlItem assemblies, ImportedNamespaceContextItem importedNamespaces, List<ModelItem> variables, string text);
20IExpressionEditorInstance CreateExpressionEditor(AssemblyContextControlItem assemblies, ImportedNamespaceContextItem importedNamespaces, List<ModelItem> variables, string text, Size initialSize);
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\TreeView\TreeViewItemViewModel.cs (14)
25HashSet<ModelItem> uniqueChildren = null;
239if (typeof(ModelItem).IsAssignableFrom(value.GetType()))
241viewModel = new TreeViewItemModelItemViewModel(parent, value as ModelItem);
247else if (typeof(KeyValuePair<ModelItem, ModelItem>).IsAssignableFrom(value.GetType()))
249viewModel = new TreeViewItemKeyValuePairModelItemViewModel(parent, (KeyValuePair<ModelItem, ModelItem>)value);
254internal static void AddModelItem(TreeViewItemViewModel parent, ModelItem item, ModelProperty trackingProperty)
284foreach (ModelItem item in collection)
305ModelItem item = null;
311internal static void AddModelProperty(TreeViewItemViewModel parent, ModelItem item, ModelProperty trackingProperty, ModelProperty property)
458internal static bool IsPromotedProperty(ModelItem modelItem, ModelProperty property)
463internal static bool IsPromotedProperty(ModelItem modelItem, string propertyName)
473internal static void AddChild(TreeViewItemViewModel parent, ModelItem item, object value, bool duplicatedNodeVisible, string childNodePrefix, ModelProperty trackingProperty)
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\VariableDesigner.xaml.cs (88)
53List<ModelItem> scopesList = new List<ModelItem>();
56ModelItem variableToSelect = null;
58ModelItem lastSelection;
107public List<ModelItem> ScopesList
122ModelItem wrappedVariable = scope.Add(variable);
225var root = treeManager.Root;
228var validScope = this.scopesList.FirstOrDefault(p => ModelItem.Equals(p, root) || root.IsParentOf(p));
230if (!ModelItem.Equals(validScope, this.CurrentVariableScope.Parent))
242void Populate(ModelItem workflowElement)
274ModelItem current = this.Context.Items.GetValue<Selection>().PrimarySelection;
282internal void SelectVariable(ModelItem variable)
315List<ModelItem> newSelection = new List<ModelItem>();
318foreach (ModelItem item in oldSelection.SelectedObjects)
355var current = this.Context.Items.GetValue<Selection>().PrimarySelection;
369void OnItemSelectedCore(ModelItem primarySelection)
374ModelItem element = VariableHelper.GetVariableScopeElement(primarySelection);
388foreach (ModelItem item in selection.SelectedObjects)
417foreach (ModelItem variable in e.NewItems)
420.FirstOrDefault<DesignTimeVariable>(p => (ModelItem.Equals(p.ReflectedObject, variable)));
449foreach (ModelItem variable in e.OldItems)
451DesignTimeVariable wrapper = this.variableWrapperCollection.FirstOrDefault(p => ModelItem.Equals(p.ReflectedObject, variable));
455if (!this.ScopesList.Contains((sender as ModelItem).Parent) || isUndoRedoInProgress)
626List<ModelItem> list = new List<ModelItem>();
636foreach (ModelItem modelItem in list)
762internal static ModelItemCollection GetVariableCollection(this ModelItem element)
780internal static ModelItem GetVariableScopeElement(this ModelItem element)
789internal static List<ModelItem> FindDeclaredVariables(this ModelItem element, IList<ModelItem> scopeList)
804internal static List<ModelItem> FindDeclaredVariables(this ModelItem element)
809internal static List<ModelItem> FindActivityDelegateArgumentsInScope(this ModelItem workflowElement)
811List<ModelItem> variables = new List<ModelItem>();
824internal static List<ModelItem> FindActivityDelegateArguments(this ModelItem element)
826List<ModelItem> delegateArguments = new List<ModelItem>();
834.Select<ModelProperty, ModelItem>(p => p.Value));
840internal static List<ModelItem> FindVariablesInScope(this ModelItem element, IList<ModelItem> scopeList)
842List<ModelItem> variables = new List<ModelItem>();
867internal static List<ModelItem> FindUniqueVariablesInScope(ModelItem element)
869Dictionary<string, ModelItem> variables = new Dictionary<string, ModelItem>();
875foreach (ModelItem modelVariable in variablesInElement)
886return new List<ModelItem>(variables.Values);
890internal static List<ModelItem> FindVariablesInScope(ModelItem element)
941internal static ModelItem FindRootVariableScope(ModelItem element)
947ModelItem result = element.GetParentEnumerator().Where(p => null != VariableHelper.GetVariableCollection(p)).LastOrDefault();
951internal static ModelItem FindCommonVariableScope(ModelItem scope1, ModelItem scope2)
1035PropertyType = typeof(ModelItem),
1036PropertyAttributes = TypeDescriptor.GetAttributes(typeof(ModelItem)).OfType<Attribute>().Union(new Attribute[] { new EditorAttribute(typeof(ScopeValueEditor), typeof(PropertyValueEditor)) }).ToArray(),
1116internal DesignTimeVariable(ModelItem modelItem, VariableDesigner editor)
1181modifiers is ModelItem ? (modifiers as ModelItem).GetCurrentValue() : modifiers);
1192ModelItem parent = this.ReflectedObject.Parent;
1231ModelItem expressionModelItem = this.ReflectedObject.Properties[VariableDefaultProperty].Value;
1264if (!ModelItem.Equals(newScope, this.GetVariableScope()))
1268ModelItem scope = (newScope as ModelItem) ?? Editor.ScopesList.FirstOrDefault(p => object.Equals(p.GetCurrentValue(), newScope));
1284object expression = value is ModelItem ? ((ModelItem)value).GetCurrentValue() : value;
1295ModelItem s = this.ReflectedObject.Parent.Parent;
1411Func<ModelItem, bool> checkForDuplicates =
1412new Func<ModelItem, bool>(p => string.Equals(p.Properties[VariableNameProperty].ComputedValue, newName) && !object.Equals(p, this.ReflectedObject));
1433ModelItem scope = (newValue as ModelItem) ?? Editor.ScopesList.FirstOrDefault(p => object.Equals(p.GetCurrentValue(), newValue));
1436Func<ModelItem, bool> checkForDuplicates =
1437new Func<ModelItem, bool>(p => string.Equals(p.Properties[VariableNameProperty].ComputedValue, currentName) && !object.Equals(p, this.ReflectedObject));
1464ModelItem designTimeVariable = value as ModelItem;
1484internal static string BuildToolTip(ModelItem entry, IMultiValueConverter displayNameConverter, CultureInfo culture)
1491ModelItem currentEntry = entry;
1523return BuildToolTip(value as ModelItem, this.baseConverter, culture);
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\ViewUtilities.cs (18)
18internal static bool DoesParentAlwaysExpandChildren(ModelItem modelItem, EditingContext context)
23internal static bool DoesParentAlwaysCollapseChildren(ModelItem modelItem, EditingContext context)
37internal static bool IsViewVisible(ModelItem child, ModelItem root, EditingContext context)
50ModelItem parent = ModelUtilities.ReverseFindFirst(child.Parent, (ModelItem current) =>
60private static bool IsDefaultDesigner(EditingContext context, ModelItem item)
67private static bool HasView(ModelItem modelItem, WorkflowViewService viewService, bool allowDrillIn)
75internal static ModelItem GetParentModelItemWithView(ModelItem modelItem, EditingContext context, bool allowDrillIn)
84return ModelUtilities.ReverseFindFirst(modelItem.Parent, (ModelItem current) =>
91internal static bool IsViewExpanded(ModelItem modelItem, EditingContext context)
117internal static bool IsBreadcrumbRoot(ModelItem modelItem, EditingContext context)
162static bool IsParentOfType(ModelItem modelItem, Type parentType, EditingContext context)
168static Type GetParentDesignerType(ModelItem modelItem, EditingContext context)
170ModelItem parent = GetParentModelItemWithView(modelItem, context, false);
205internal static string GetActivityBuilderDisplayName(ModelItem modelItem)
208ModelItem nameModelItem = modelItem.Properties["Name"].Value;
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\View\WorkflowViewStateService.cs (7)
61public override object RetrieveViewState(ModelItem modelItem, string key)
81public override void StoreViewState(ModelItem modelItem, string key, object value)
114public override bool RemoveViewState(ModelItem modelItem, string key)
137public override Dictionary<string, object> RetrieveAllViewState(ModelItem modelItem)
147public override void StoreViewStateWithUndo(ModelItem modelItem, string key, object value)
165void RaiseUndoableViewStateChangedEvent(ModelItem modelItem, string key, object newValue, object oldValue)
178public ModelItem Item { get; set; }
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\WorkflowViewElement.cs (20)
36DependencyProperty.Register("ModelItem", typeof(ModelItem), typeof(WorkflowViewElement), new FrameworkPropertyMetadata(null, new PropertyChangedCallback(WorkflowViewElement.OnModelItemChanged)));
308public ModelItem ModelItem
310get { return (ModelItem)GetValue(ModelItemProperty); }
529foreach (ModelItem item in selection.SelectedObjects)
655bool isSelected = this.Context.Items.GetValue<Selection>().SelectedObjects.Contains<ModelItem>(this.ModelItem);
677foreach (ModelItem item in selection.SelectedObjects)
730return selection.SelectedObjects.All<ModelItem>((p) =>
922Dictionary<ModelItem, ICompositeView> sourceContainers = new Dictionary<ModelItem, ICompositeView>();
925IEnumerable<ModelItem> selectedObjects = selection.SelectedObjects;
926IEnumerable<ModelItem> modelItemsToDrag = DragDropHelper.GetModelItemsToDrag(selectedObjects);
929foreach (ModelItem modelItem in modelItemsToDrag)
957Dictionary<ICompositeView, List<ModelItem>> containerMovedModelItemList = new Dictionary<ICompositeView, List<ModelItem>>();
966containerMovedModelItemList.Add(compView, new List<ModelItem>());
972foreach (KeyValuePair<ICompositeView, List<ModelItem>> pair in containerMovedModelItemList)
1003ModelItem movedItem = modelItemsToDrag.First<ModelItem>();
1023foreach (ModelItem item in selectedObjects)
1085ModelItem modelItem = this.owner.ModelItem;
cdf\src\NetFx40\Tools\System.Activities.Presentation\System\Activities\Presentation\Xaml\ObjectToSourceLocationMapping.cs (16)
20private IDictionary<SourceLocation, ModelItem> sourceLocationToModelItemMapping;
21private IDictionary<SourceLocation, ModelItem> viewStateSourceLocationToModelItemMapping;
31this.sourceLocationToModelItemMapping = new Dictionary<SourceLocation, ModelItem>();
32this.viewStateSourceLocationToModelItemMapping = new Dictionary<SourceLocation, ModelItem>();
66private void UpdateSourceLocationToModelItemMapping(IEnumerable<ModelItem> modelItemsOnDesigner)
71foreach (ModelItem modelItem in modelItemsOnDesigner)
95internal ModelItem FindModelItem(SourceLocation srcLocation)
101internal ModelItem FindModelItemOfViewState(SourceLocation srcLocation)
107internal SourceLocation FindSourceLocation(ModelItem modelItem)
110KeyValuePair<SourceLocation, ModelItem>? matchingMappingRecord = sourceLocationToModelItemMapping.SingleOrDefault(kvp => object.ReferenceEquals(kvp.Value, modelItem));
121private static ModelItem FindModelItemInMap(SourceLocation sourceLocation, IDictionary<SourceLocation, ModelItem> map)
132internal IEnumerable<ModelItem> GetObjectsWithSourceLocation()
165private static SourceLocation FindMatchSrcLocation(ModelItem modelItem, Dictionary<object, SourceLocation> mapping)
187private static SourceLocation GetExactLocation(SourceLocation approximateLocation, IDictionary<SourceLocation, ModelItem> mapping)
217IEnumerable<ModelItem> itemsOnDesigner = this.modelSearchService.GetItemsOnDesigner(preOrder: false, excludeRoot: false, excludeErrorActivity: false, excludeExpression: false, includeOtherObjects: true);