private void initializeStateCodeActivity_Initialize_ExecuteCode(object sender, EventArgs e)
        {
            Type targetType = TypeManager.GetType(this.Payload);

            this.Bindings.Add(this.NewTypeNameBindingName, "");
            this.Bindings.Add(this.NewTypeNamespaceBindingName, UserSettings.LastSpecifiedNamespace);
            this.Bindings.Add(this.NewTypeTitleBindingName, "");
            this.Bindings.Add(this.DataFieldDescriptorsBindingName, new List<DataFieldDescriptor>());
            this.Bindings.Add(this.LabelFieldNameBindingName, "");
            this.Bindings.Add(this.HasCachingNameBindingName, false);

            this.Bindings.Add(this.HasPublishingBindingName, typeof(IPublishControlled).IsAssignableFrom(targetType));

            this.Bindings.Add("HasLocalization", true);

            this.BindingsValidationRules.Add(this.NewTypeNameBindingName, new List<ClientValidationRule> { new NotNullClientValidationRule() });
            this.BindingsValidationRules.Add(this.NewTypeNamespaceBindingName, new List<ClientValidationRule> { new NotNullClientValidationRule() });
            this.BindingsValidationRules.Add(this.NewTypeTitleBindingName, new List<ClientValidationRule> { new NotNullClientValidationRule() });

            if ((RuntimeInformation.IsDebugBuild) && (DynamicTempTypeCreator.UseTempTypeCreator))
            {
                DynamicTempTypeCreator dynamicTempTypeCreator = new DynamicTempTypeCreator("PageMetaData");

                this.UpdateBinding(this.NewTypeNameBindingName, dynamicTempTypeCreator.TypeName);
                this.UpdateBinding(this.NewTypeTitleBindingName, dynamicTempTypeCreator.TypeTitle);
                this.UpdateBinding(this.DataFieldDescriptorsBindingName, dynamicTempTypeCreator.DataFieldDescriptors);
                this.UpdateBinding(this.LabelFieldNameBindingName, dynamicTempTypeCreator.DataFieldDescriptors.First().Name);
            }
        }
        private void initialStateCodeActivity_ExecuteCode(object sender, EventArgs e)
        {
            var dataFieldDescriptors = new List<DataFieldDescriptor>
            {
                GeneratedTypesHelper.BuildIdField()
            };

            this.Bindings = new Dictionary<string, object>
            {
                {BindingNames.ViewLabel, IsPageDataFolder ? Texts.AddNewAggregationTypeWorkflow_DocumentTitle : Texts.AddNewInterfaceTypeStep1_DocumentTitle},
                {BindingNames.NewTypeName, ""},
                {BindingNames.NewTypeNamespace, UserSettings.LastSpecifiedNamespace},
                {BindingNames.NewTypeTitle, ""},
                {BindingNames.DataFieldDescriptors, dataFieldDescriptors},
                {BindingNames.HasCaching, false},
                {BindingNames.HasPublishing, false},
                {BindingNames.HasLocalization, false},
                {BindingNames.KeyFieldName, dataFieldDescriptors.First().Name},
                {BindingNames.LabelFieldName, ""},
                {BindingNames.KeyFieldReadOnly, false}
            };

            this.BindingsValidationRules = new Dictionary<string, List<ClientValidationRule>>
            {
                {BindingNames.NewTypeName, new List<ClientValidationRule> {new NotNullClientValidationRule()}},
                {BindingNames.NewTypeNamespace, new List<ClientValidationRule> {new NotNullClientValidationRule()}},
                {BindingNames.NewTypeTitle, new List<ClientValidationRule> {new NotNullClientValidationRule()}}
            };

            if (RuntimeInformation.IsDebugBuild && DynamicTempTypeCreator.UseTempTypeCreator)
            {
                var dynamicTempTypeCreator = new DynamicTempTypeCreator(IsPageDataFolder ? "PageFolder" : "GlobalTest");

                dataFieldDescriptors.AddRange(dynamicTempTypeCreator.DataFieldDescriptors);

                this.UpdateBinding(BindingNames.NewTypeName, dynamicTempTypeCreator.TypeName);
                this.UpdateBinding(BindingNames.NewTypeTitle, dynamicTempTypeCreator.TypeTitle);
                this.UpdateBinding(BindingNames.LabelFieldName, dynamicTempTypeCreator.DataFieldDescriptors.First().Name);
            }
        }