public void InitializeContext()
            {
                this.store.TransactionManager.DoWithinTransaction(() =>
                {
                    var patternModel = store.ElementFactory.CreateElement<PatternModelSchema>();
                    this.product = patternModel.Create<PatternSchema>();
                    this.product.Name = "WebService";
                });

                this.guidanceExtension = ExtensionElement.GetExtension<GuidanceExtension>(this.product);
            }
        /// <summary>
        /// Handles the property change event for the AssociatedGuidance properties.
        /// </summary>
        /// <param name="e">The event args.</param>
        public override void ElementPropertyChanged(ElementPropertyChangedEventArgs e)
        {
            Guard.NotNull(() => e, e);

            if ((e.DomainProperty.Id == GuidanceExtension.ExtensionIdDomainPropertyId) ||
                (e.DomainProperty.Id == GuidanceExtension.GuidanceInstanceNameDomainPropertyId) ||
                (e.DomainProperty.Id == GuidanceExtension.GuidanceSharedInstanceDomainPropertyId) ||
                (e.DomainProperty.Id == GuidanceExtension.GuidanceActivateOnCreationDomainPropertyId))
            {
                // Ensure we are not in deserialization mode.
                if (!e.ModelElement.Store.TransactionManager.CurrentTransaction.IsSerializing)
                {
                    GuidanceExtension guidanceExtension = (GuidanceExtension)e.ModelElement;
                    if (guidanceExtension != null)
                    {
                        guidanceExtension.EnsureGuidanceExtensionAutomation();
                    }
                }
            }
        }