105 references to GenericFlowSwitchHelper
System.Activities.Core.Presentation (105)
System\Activities\Core\Presentation\FlowchartDesigner.Container.cs (5)
175else if (GenericFlowSwitchHelper.IsGenericFlowSwitch(currentFlowElement.GetType())) 177GenericFlowSwitchHelper.Copy(currentFlowElement.GetType().GetGenericArguments()[0], currentFlowElement, clonedFlowElements); 238else if (GenericFlowSwitchHelper.IsGenericFlowSwitch(currentFlowElement.GetType())) 240GenericFlowSwitchHelper.ReferenceCopy(currentFlowElement.GetType().GetGenericArguments()[0], 304if (GenericFlowSwitchHelper.IsGenericFlowSwitch(item.ItemType) &&
System\Activities\Core\Presentation\FlowchartDesigner.ModelChangeReactions.cs (27)
145else if (GenericFlowSwitchHelper.IsGenericFlowSwitch(e.ParentModelItem.ItemType)) 156switchCase = GenericFlowSwitchHelper.GetObject(switchCaseName, genericType); 158if (GenericFlowSwitchHelper.ContainsCaseKey(e.ParentModelItem.Properties["Cases"], switchCase)) 161changedConnector = this.GetLinkOnCanvas(e.ParentModelItem, GenericFlowSwitchHelper.GetCaseModelItem(e.ParentModelItem.Properties["Cases"], switchCase), GenericFlowSwitchHelper.FlowSwitchCasesKeyIdentifier + switchCase); 186IFlowSwitchLink link = GenericFlowSwitchHelper.CreateFlowSwitchLink(flowSwitchModelItem.ItemType, flowSwitchModelItem, ((IFlowSwitchLink)oldLinkModelItem.GetCurrentValue()).CaseObject, isDefault); 242string caseName = GenericFlowSwitchHelper.GetString(item.Properties["Key"].ComputedValue, item.Properties["Key"].PropertyType); 245item.Properties["Value"].Value, GenericFlowSwitchHelper.FlowSwitchCasesKeyIdentifier + caseName); 260GenericFlowSwitchHelper.FlowSwitchCasesKeyIdentifier + caseName); 283string caseName = GenericFlowSwitchHelper.GetString(dictionaryChange.Key == null ? null : dictionaryChange.Key.GetCurrentValue(), dictionaryChange.Key == null ? null : dictionaryChange.Key.ItemType); 284string caseNameInModelItem = GenericFlowSwitchHelper.FlowSwitchCasesKeyIdentifier + caseName; 342if (GenericFlowSwitchHelper.IsGenericFlowSwitch(propertyChange.Owner.ItemType)) 453else if (GenericFlowSwitchHelper.IsGenericFlowSwitch(currentMI.ItemType)) 466IFlowSwitchLink link = GenericFlowSwitchHelper.CreateFlowSwitchLink(currentMI.ItemType, currentMI, null, true); 474foreach (ModelItem key in GenericFlowSwitchHelper.GetCaseKeys(currentMI.Properties["Cases"])) 476ModelItem destFlowElementMI = GenericFlowSwitchHelper.GetCaseModelItem(currentMI.Properties["Cases"], (key == null) ? null : key.GetCurrentValue()); 477IFlowSwitchLink link = GenericFlowSwitchHelper.CreateFlowSwitchLink(currentMI.ItemType, currentMI, (key == null) ? null : key.GetCurrentValue(), false); 636else if (GenericFlowSwitchHelper.IsGenericFlowSwitch(srcModelItem.ItemType)) 642link = GenericFlowSwitchHelper.CreateFlowSwitchLink(srcModelItem.ItemType, srcModelItem, null, true); 646Fx.Assert(propertyName.Length >= GenericFlowSwitchHelper.FlowSwitchCasesKeyIdentifier.Length, "Case property names should be prepended by the string GenericFlowSwitchHelper.FlowSwitchCasesKeyIdentifier"); 647link = GenericFlowSwitchHelper.CreateFlowSwitchLink(srcModelItem.ItemType, srcModelItem, propertyName.Substring(GenericFlowSwitchHelper.FlowSwitchCasesKeyIdentifier.Length), false); 685if (GenericFlowSwitchHelper.IsGenericFlowSwitch(srcFlowElementModelItem.ItemType)) 698string caseName = connectorCaseMI == null ? null : GenericFlowSwitchHelper.GetString(connectorCaseMI.GetCurrentValue(), connectorCaseMI.ItemType); 699if (connectorCaseMI != null && caseName.Equals(propertyName.Substring(GenericFlowSwitchHelper.FlowSwitchCasesKeyIdentifier.Length))) 706if (GenericFlowSwitchHelper.FlowSwitchNullCaseKeyIdentifier.Equals(propertyName.Substring(GenericFlowSwitchHelper.FlowSwitchCasesKeyIdentifier.Length)))
System\Activities\Core\Presentation\FlowchartDesigner.ModelChanges.cs (6)
99GenericFlowSwitchHelper.RemoveCase(realFlowSwitchMI.Properties["Cases"], flowSwitchLink.CaseObject); 217IFlowSwitchLink link = GenericFlowSwitchHelper.CreateFlowSwitchLink(srcFlowElementMI.ItemType, srcFlowElementMI, null, true); 235if (GenericFlowSwitchHelper.CanBeGeneratedUniquely(typeArgument)) 237uniqueCaseName = GenericFlowSwitchHelper.GetCaseName(casesProp, typeArgument, out errorMessage); 257IFlowSwitchLink link = GenericFlowSwitchHelper.CreateFlowSwitchLink(srcFlowElementMI.ItemType, srcFlowElementMI, uniqueCaseName, false); 264GenericFlowSwitchHelper.AddCase(srcFlowElementMI.Properties["Cases"], link.CaseObject, destFlowElementMI.GetCurrentValue());
System\Activities\Core\Presentation\FlowchartDesigner.xaml.cs (6)
556if (GenericFlowSwitchHelper.IsGenericFlowSwitch(model.ItemType)) 1122GenericFlowSwitchHelper.IsGenericFlowSwitch(model.ItemType)) 1280if (sourceContainer != null && GenericFlowSwitchHelper.IsGenericFlowSwitch(sourceContainer.ModelItem.ItemType)) 2307else if (GenericFlowSwitchHelper.IsGenericFlowSwitch(sourceModelItem.ItemType)) 2474else if (GenericFlowSwitchHelper.IsGenericFlowSwitch(srcFlowNodeModelItem.ItemType)) 2496else if (GenericFlowSwitchHelper.IsGenericFlowSwitch(droppedModelItem.ItemType))
System\Activities\Core\Presentation\FlowSwitchCaseEditorDialog.cs (2)
89return GenericFlowSwitchHelper.ValidateCaseKey(obj, 113return GenericFlowSwitchHelper.GetString(GetValue(caseProperty), this.genericType);
System\Activities\Core\Presentation\FlowSwitchLink.cs (16)
54return GenericFlowSwitchHelper.ValidateCaseKey(obj, 93return GenericFlowSwitchHelper.GetString((T)value, typeof(T)); 168ModelItem flowNodeMI = GenericFlowSwitchHelper.GetCaseModelItem(this.flowSwitchModelItem.Properties["Cases"], this.CaseObject); 169GenericFlowSwitchHelper.RemoveCase(this.flowSwitchModelItem.Properties["Cases"], this.CaseObject); 193if (GenericFlowSwitchHelper.CanBeGeneratedUniquely(typeArgument)) 195string caseName = GenericFlowSwitchHelper.GetCaseName(this.flowSwitchModelItem.Properties["Cases"], typeArgument, out errorMessage); 202uniqueCase = GenericFlowSwitchHelper.GetObject(caseName, typeArgument); 217if (GenericFlowSwitchHelper.ContainsCaseKey(this.flowSwitchModelItem.Properties["Cases"], uniqueCase)) 232GenericFlowSwitchHelper.AddCase(this.flowSwitchModelItem.Properties["Cases"], uniqueCase, defaultCase.GetCurrentValue()); 237GenericFlowSwitchHelper.AddCase(this.flowSwitchModelItem.Properties["Cases"], uniqueCase, defaultCase.GetCurrentValue()); 239this.UpdateViewState(DefaultConnectorViewStateKey, GenericFlowSwitchHelper.GetString(uniqueCase, typeof(T)) + CaseViewStateKeyAppendString); 286flowElementMI = GenericFlowSwitchHelper.GetCaseModelItem(this.flowSwitchModelItem.Properties["Cases"], oldValue); 287GenericFlowSwitchHelper.RemoveCase(this.flowSwitchModelItem.Properties["Cases"], oldValue); 288oldViewStateKey = GenericFlowSwitchHelper.GetString(oldValue, typeof(T)) + CaseViewStateKeyAppendString; 290GenericFlowSwitchHelper.AddCase(this.flowSwitchModelItem.Properties["Cases"], newValue, flowElementMI.GetCurrentValue()); 292this.UpdateViewState(oldViewStateKey, GenericFlowSwitchHelper.GetString(newValue, typeof(T)) + CaseViewStateKeyAppendString);
System\Activities\Core\Presentation\FlowSwitchLinkMultiValueConverter.cs (1)
25return GenericFlowSwitchHelper.GetString(values[0], (Type) parameter);
System\Activities\Core\Presentation\GenericFlowSwitchHelper.cs (42)
18static readonly MethodInfo genericCopy = typeof(GenericFlowSwitchHelper).GetMethod("GenericCopy"); 19static readonly MethodInfo genericCreateGenericFlowSwitchLink = typeof(GenericFlowSwitchHelper).GetMethod("CreateGenericFlowSwitchLink"); 20static readonly MethodInfo genericGetCaseName = typeof(GenericFlowSwitchHelper).GetMethod("GenericGetCaseName"); 21static readonly MethodInfo genericRemapFlowSwitch = typeof(GenericFlowSwitchHelper).GetMethod("GenericRemapFlowSwitch"); 135foreach (ModelItem key in GenericFlowSwitchHelper.GetCaseKeys(casesProperty)) 137GenericFlowSwitchHelper.RemoveCase(casesProperty, key.GetCurrentValue()); 143GenericFlowSwitchHelper.AddCase(casesProperty, key, keyValueMap[key]); 203if (!GenericFlowSwitchHelper.ContainsCaseKey(collection, caseName)) 210else if (GenericFlowSwitchHelper.IsIntegralType(type)) 217if (!GenericFlowSwitchHelper.ContainsCaseKey(collection, i)) 219return GenericFlowSwitchHelper.GetString(i, type); 228if (!GenericFlowSwitchHelper.ContainsCaseKey(collection, i)) 230return GenericFlowSwitchHelper.GetString(i, type); 239if (!GenericFlowSwitchHelper.ContainsCaseKey(collection, i)) 241return GenericFlowSwitchHelper.GetString(i, type); 250if (!GenericFlowSwitchHelper.ContainsCaseKey(collection, i)) 252return GenericFlowSwitchHelper.GetString(i, type); 261if (!GenericFlowSwitchHelper.ContainsCaseKey(collection, i)) 263return GenericFlowSwitchHelper.GetString(i, type); 271if (!GenericFlowSwitchHelper.ContainsCaseKey(collection, i)) 273return GenericFlowSwitchHelper.GetString(i, type); 281if (!GenericFlowSwitchHelper.ContainsCaseKey(collection, i)) 283return GenericFlowSwitchHelper.GetString(i, type); 291if (!GenericFlowSwitchHelper.ContainsCaseKey(collection, i)) 293return GenericFlowSwitchHelper.GetString(i, type); 301if (!GenericFlowSwitchHelper.ContainsCaseKey(collection, i)) 303return GenericFlowSwitchHelper.GetString(i, type); 315if (!GenericFlowSwitchHelper.ContainsCaseKey(collection, value)) 317return GenericFlowSwitchHelper.GetString(value, type); 325if (!GenericFlowSwitchHelper.ContainsCaseKey(collection, true)) 327return GenericFlowSwitchHelper.GetString(true, type); 329else if (!GenericFlowSwitchHelper.ContainsCaseKey(collection, false)) 331return GenericFlowSwitchHelper.GetString(false, type); 426if (GenericFlowSwitchHelper.FlowSwitchNullCaseKeyIdentifier.Equals(key)) 445return GenericFlowSwitchHelper.GetCaseModelItem(itemsCollection, key); 450if (GenericFlowSwitchHelper.FlowSwitchNullCaseKeyIdentifier.Equals(key)) 469return GenericFlowSwitchHelper.GetCaseModelItem(itemsCollection, key).GetCurrentValue(); 487if (GenericFlowSwitchHelper.FlowSwitchNullCaseKeyIdentifier.Equals(key)) 520|| GenericFlowSwitchHelper.IsIntegralType(typeArgument) || typeof(bool) == typeArgument; 540string key = GenericFlowSwitchHelper.GetString(obj, genericType); 541if (GenericFlowSwitchHelper.CheckEquality(obj, genericType)) 543if (GenericFlowSwitchHelper.ContainsCaseKey(casesProp, obj))