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