Пример #1
0
        private IDictionary <string, string> CreateNamespaceMappings()
        {
            var namespaceMappings = new Dictionary <string, string>();

            if (NamespaceMappings != null)
            {
                var namespaceMappingFactory = new NamespaceMappingFactory();

                foreach (var item in NamespaceMappings)
                {
                    var namespaceMapping = namespaceMappingFactory.Create(item);
                    namespaceMappings.Add(namespaceMapping.TargetNamespace, namespaceMapping.ClrNamespace);
                }
            }

            return(namespaceMappings);
        }
Пример #2
0
        private IDictionary <string, string> CreateNamespaceMappings()
        {
            var namespaceMappings = new Dictionary <string, string>();

            if (NamespaceMappings != null)
            {
                var namespaceMappingFactory = new NamespaceMappingFactory();

                foreach (var item in NamespaceMappings)
                {
                    var namespaceMapping = namespaceMappingFactory.Create(item);

                    if (namespaceMappings.ContainsKey(namespaceMapping.TargetNamespace))
                    {
                        Log.LogError($"NamespaceMapping for '{namespaceMapping.TargetNamespace}' is defined more than once.");
                        continue;
                    }

                    namespaceMappings.Add(namespaceMapping.TargetNamespace, namespaceMapping.ClrNamespace);
                }
            }

            return(namespaceMappings);
        }