Beispiel #1
0
        public void FillSolutionComponentFromXml(ICollection <SolutionComponent> result, XElement elementRootComponent, XDocument docCustomizations)
        {
            if (elementRootComponent == null)
            {
                return;
            }

            var id = DefaultSolutionComponentDescriptionBuilder.GetIdFromXml(elementRootComponent);

            if (id.HasValue)
            {
                int?behavior = DefaultSolutionComponentDescriptionBuilder.GetBehaviorFromXml(elementRootComponent);

                FillSolutionComponentInternal(result, id.Value, behavior);
            }
        }
        public void FillSolutionComponentFromXml(ICollection <SolutionComponent> result, XElement elementRootComponent, XDocument docCustomizations)
        {
            if (elementRootComponent == null)
            {
                return;
            }

            var schemaName = DefaultSolutionComponentDescriptionBuilder.GetSchemaNameFromXml(elementRootComponent);

            if (!string.IsNullOrEmpty(schemaName))
            {
                EntityMetadata metaData = _source.GetEntityMetadata(schemaName);

                if (metaData != null)
                {
                    int?behavior = DefaultSolutionComponentDescriptionBuilder.GetBehaviorFromXml(elementRootComponent);

                    FillSolutionComponentInternal(result, metaData, behavior);

                    if (behavior == (int)SolutionComponent.Schema.OptionSets.rootcomponentbehavior.Include_As_Shell_Only_2 ||
                        behavior == (int)SolutionComponent.Schema.OptionSets.rootcomponentbehavior.Do_not_include_subcomponents_1
                        )
                    {
                        var elementEntity = GetEntityElement(docCustomizations, metaData.LogicalName);

                        if (elementEntity != null)
                        {
                            FillAttributesFromCustomization(result, metaData, elementEntity);

                            FillEntityKeysFromCustomization(result, metaData, elementEntity);

                            FillSavedQueriesFromCustomization(result, metaData, elementEntity);

                            FillChartsFromCustomization(result, metaData, elementEntity);

                            FillDisplayStringsFromCustomization(result, metaData, elementEntity);

                            FillRelationsFromCustomization(result, metaData, docCustomizations);
                        }
                    }
                }
            }
        }
Beispiel #3
0
        public void FillSolutionComponentFromXml(ICollection <SolutionComponent> result, XElement elementRootComponent, XDocument docCustomizations)
        {
            if (elementRootComponent == null)
            {
                return;
            }

            var id = DefaultSolutionComponentDescriptionBuilder.GetIdFromXml(elementRootComponent);

            if (id.HasValue &&
                this.AllManagedProperties != null &&
                this.AllManagedProperties.Any() &&
                this.AllManagedProperties.ContainsKey(id.Value)
                )
            {
                int?behavior = DefaultSolutionComponentDescriptionBuilder.GetBehaviorFromXml(elementRootComponent);

                FillSolutionComponentInternal(result, id.Value, behavior);
            }
        }
        public void FillSolutionComponentFromXml(ICollection <SolutionComponent> result, XElement elementRootComponent, XDocument docCustomizations)
        {
            if (elementRootComponent == null)
            {
                return;
            }

            var schemaName = DefaultSolutionComponentDescriptionBuilder.GetSchemaNameFromXml(elementRootComponent);

            if (!string.IsNullOrEmpty(schemaName))
            {
                var optionSet = this._source.AllOptionSetMetadata.Values.FirstOrDefault(o => string.Equals(o.Name, schemaName, StringComparison.InvariantCultureIgnoreCase));

                if (optionSet != null)
                {
                    int?behavior = DefaultSolutionComponentDescriptionBuilder.GetBehaviorFromXml(elementRootComponent);

                    FillSolutionComponentInternal(result, optionSet, behavior);
                }
            }
        }