Esempio n. 1
0
 /// <summary>
 /// Adds an extension.
 /// </summary>
 /// <param name="extension">The extension to add.</param>
 public void AddExtension(WixExtension extension)
 {
     if (null != extension.InspectorExtension)
     {
         this.inspectorExtensions.Add(extension.InspectorExtension);
     }
 }
Esempio n. 2
0
 /// <summary>
 /// Adds an extension.
 /// </summary>
 /// <param name="extension">The extension to add.</param>
 public void AddExtension(WixExtension extension)
 {
     if (null != extension.InspectorExtension)
     {
         this.inspectorExtensions.Add(extension.InspectorExtension);
     }
 }
Esempio n. 3
0
        /// <summary>
        /// Adds an extension.
        /// </summary>
        /// <param name="extension">The extension to add.</param>
        public void AddExtension(WixExtension extension)
        {
            if (null == extension)
            {
                throw new ArgumentNullException("extension");
            }

            if (null != extension.BinderExtension)
            {
                this.extensions.Add(extension.BinderExtension);
            }

            if (null != extension.InspectorExtension)
            {
                this.inspectorExtensions.Add(extension.InspectorExtension);
            }
        }
Esempio n. 4
0
 /// <summary>
 /// Adds an extension.
 /// </summary>
 /// <param name="extension">The extension to add.</param>
 public void AddExtension(WixExtension extension)
 {
     if (null != extension.TableDefinitions)
     {
         foreach (TableDefinition tableDefinition in extension.TableDefinitions)
         {
             if (!this.tableDefinitions.Contains(tableDefinition.Name))
             {
                 this.tableDefinitions.Add(tableDefinition);
             }
             else
             {
                 throw new WixException(WixErrors.DuplicateExtensionTable(extension.GetType().ToString(), tableDefinition.Name));
             }
         }
     }
 }
Esempio n. 5
0
 /// <summary>
 /// Adds an extension.
 /// </summary>
 /// <param name="extension">The extension to add.</param>
 public void AddExtension(WixExtension extension)
 {
     if (null != extension.TableDefinitions)
     {
         foreach (TableDefinition tableDefinition in extension.TableDefinitions)
         {
             if (!this.tableDefinitions.Contains(tableDefinition.Name))
             {
                 this.tableDefinitions.Add(tableDefinition);
             }
             else
             {
                 throw new WixException(WixErrors.DuplicateExtensionTable(extension.GetType().ToString(), tableDefinition.Name));
             }
         }
     }
 }
Esempio n. 6
0
        /// <summary>
        /// Adds an extension.
        /// </summary>
        /// <param name="extension">The extension to add.</param>
        public void AddExtension(WixExtension extension)
        {
            if (null == extension)
            {
                throw new ArgumentNullException("extension");
            }

            if (null != extension.CompilerExtension)
            {
                CompilerExtension collidingExtension = (CompilerExtension)this.extensions[extension.CompilerExtension.Schema.TargetNamespace];

                // check if this extension is adding a schema namespace that already exists
                if (null == collidingExtension)
                {
                    this.extensions.Add(extension.CompilerExtension.Schema.TargetNamespace, extension.CompilerExtension);
                }
                else
                {
                    throw new WixException(WixErrors.DuplicateExtensionXmlSchemaNamespace(extension.CompilerExtension.GetType().ToString(), extension.CompilerExtension.Schema.TargetNamespace, collidingExtension.GetType().ToString()));
                }

                if (null != extension.TableDefinitions)
                {
                    foreach (TableDefinition tableDefinition in extension.TableDefinitions)
                    {
                        if (!this.tableDefinitions.Contains(tableDefinition.Name))
                        {
                            this.tableDefinitions.Add(tableDefinition);
                        }
                        else
                        {
                            throw new WixException(WixErrors.DuplicateExtensionTable(extension.GetType().ToString(), tableDefinition.Name));
                        }
                    }
                }
            }

            if (null != extension.InspectorExtension)
            {
                this.inspectorExtensions.Add(extension.InspectorExtension);
            }
        }
Esempio n. 7
0
        /// <summary>
        /// Adds an extension.
        /// </summary>
        /// <param name="extension">The extension to add.</param>
        public void AddExtension(WixExtension extension)
        {
            if (null != extension.PreprocessorExtension)
            {
                this.extensions.Add(extension.PreprocessorExtension);

                if (null != extension.PreprocessorExtension.Prefixes)
                {
                    foreach (string prefix in extension.PreprocessorExtension.Prefixes)
                    {
                        PreprocessorExtension collidingExtension = (PreprocessorExtension)this.extensionsByPrefix[prefix];

                        if (null == collidingExtension)
                        {
                            this.extensionsByPrefix.Add(prefix, extension.PreprocessorExtension);
                        }
                        else
                        {
                            throw new WixException(WixErrors.DuplicateExtensionPreprocessorType(extension.GetType().ToString(), prefix, collidingExtension.GetType().ToString()));
                        }
                    }
                }
            }

            if (null != extension.InspectorExtension)
            {
                this.inspectorExtensions.Add(extension.InspectorExtension);
            }
        }
Esempio n. 8
0
File: Linker.cs Progetto: zooba/wix3
        /// <summary>
        /// Adds an extension.
        /// </summary>
        /// <param name="extension">The extension to add.</param>
        public void AddExtension(WixExtension extension)
        {
            if (null != extension.TableDefinitions)
            {
                foreach (TableDefinition tableDefinition in extension.TableDefinitions)
                {
                    if (!this.tableDefinitions.Contains(tableDefinition.Name))
                    {
                        this.tableDefinitions.Add(tableDefinition);
                    }
                    else
                    {
                        throw new WixException(WixErrors.DuplicateExtensionTable(extension.GetType().ToString(), tableDefinition.Name));
                    }
                }
            }

            // keep track of extensions so the libraries can be loaded later once all the table definitions
            // are loaded; this will allow extensions to have cross table definition dependencies
            this.extensions.Add(extension);

            // keep track of inspector extensions separately
            if (null != extension.InspectorExtension)
            {
                this.inspectorExtensions.Add(extension.InspectorExtension);
            }
        }
Esempio n. 9
0
File: Binder.cs Progetto: zooba/wix3
        /// <summary>
        /// Process a list of loaded extensions.
        /// </summary>
        /// <param name="loadedExtensionList">The list of loaded extensions.</param>
        public override void ProcessExtensions(WixExtension[] loadedExtensionList)
        {
            bool binderFileManagerLoaded = false;
            bool validatorExtensionLoaded = false;

            foreach (WixExtension wixExtension in loadedExtensionList)
            {
                if (null != wixExtension.BinderFileManager)
                {
                    if (binderFileManagerLoaded)
                    {
                        core.OnMessage(WixErrors.CannotLoadBinderFileManager(wixExtension.BinderFileManager.GetType().ToString(), this.FileManager.ToString()));
                    }

                    this.FileManager = wixExtension.BinderFileManager;
                    binderFileManagerLoaded = true;
                }

                ValidatorExtension validatorExtension = wixExtension.ValidatorExtension;
                if (null != validatorExtension)
                {
                    if (validatorExtensionLoaded)
                    {
                        core.OnMessage(WixErrors.CannotLoadLinkerExtension(validatorExtension.GetType().ToString(), this.validator.Extension.ToString()));
                    }

                    this.validator.Extension = validatorExtension;
                    validatorExtensionLoaded = true;
                }
            }

            this.FileManager.CabCachePath = this.cabCachePath;
            this.FileManager.ReuseCabinets = this.reuseCabinets;
        }
Esempio n. 10
0
 /// <summary>
 /// Process a list of loaded extensions.
 /// </summary>
 /// <param name="loadedExtensionList">The list of loaded extensions.</param>
 public abstract void ProcessExtensions(WixExtension[] loadedExtensionList);
Esempio n. 11
0
        /// <summary>
        /// Adds an extension.
        /// </summary>
        /// <param name="extension">The extension to add.</param>
        public void AddExtension(WixExtension extension)
        {
            if (null == extension)
            {
                throw new ArgumentNullException("extension");
            }

            if (null != extension.BinderExtension)
            {
                this.extensions.Add(extension.BinderExtension);
            }

            if (null != extension.InspectorExtension)
            {
                this.inspectorExtensions.Add(extension.InspectorExtension);
            }
        }