public override void Execute() { if (!StateCommuter.Current.IsGetObject) { StateCommuter.CreateInstanceOfCurrentXamlTypeIfNotCreatedBefore(); StateCommuter.PutNameToCurrentInstanceIfAny(); var instance = StateCommuter.Current.Instance; if (instance is IMarkupExtension) { ProcessCurrentInstanceValueWithMarkupExtension(); } else if (!StateCommuter.WasAssociatedRightAfterCreation) { StateCommuter.AssociateCurrentInstanceToParent(); } StateCommuter.RegisterInstanceNameToNamescope(); lifyCycleListener.OnAfterProperties(instance); lifyCycleListener.OnEnd(instance); } setResult(StateCommuter); StateCommuter.DecreaseLevel(); }
public override void Execute() { if (!StateCommuter.Current.IsGetObject) { StateCommuter.CreateInstanceOfCurrentXamlTypeIfNotCreatedBefore(); if (StateCommuter.Current.Instance is IMarkupExtension) { object val = StateCommuter.GetValueProvidedByMarkupExtension((IMarkupExtension)StateCommuter.Current.Instance); StateCommuter tempQualifier = StateCommuter; tempQualifier.Current.Instance = val; var collection = val as ICollection; if (collection != null) { tempQualifier.Current.Collection = collection; } StateCommuter.AssociateCurrentInstanceToParent(); } else if (!StateCommuter.Current.WasInstanceAssignedRightAfterBeingCreated) { StateCommuter.AssociateCurrentInstanceToParent(); } } Assembler.Result = StateCommuter.Current.Instance; StateCommuter.DecreaseLevel(); }
private void CreateInstanceOfCurrentTypeAndAssociateIfPossible() { StateCommuter.CreateInstanceOfCurrentXamlTypeIfNotCreatedBefore(); if (!StateCommuter.WasAssociatedRightAfterCreation) { StateCommuter.AssociateCurrentInstanceToParentForCreation(); } }
private void AccommodateLevelsForIncomingChildren() { StateCommuter.CreateInstanceOfCurrentXamlTypeIfNotCreatedBefore(); var instance = StateCommuter.Current.Instance; var collection = instance as ICollection; if (collection != null) { StateCommuter.Current.Collection = collection; } }
private void ForceInstanceCreationOfCurrentType() { StateCommuter.CreateInstanceOfCurrentXamlTypeIfNotCreatedBefore(); }