Beispiel #1
0
        /// <summary>
        /// Gets the standard actions stored in this assembly.
        /// </summary>
        /// <returns>Collection of standard actions in this assembly.</returns>
        internal static WixActionRowCollection GetStandardActions()
        {
            lock (lockObject)
            {
                if (null == standardActions)
                {
                    Assembly  assembly = Assembly.GetExecutingAssembly();
                    XmlReader actionDefinitionsReader = null;

                    try
                    {
                        actionDefinitionsReader = new XmlTextReader(assembly.GetManifestResourceStream("Microsoft.Tools.WindowsInstallerXml.Data.actions.xml"));
#if DEBUG
                        standardActions = WixActionRowCollection.Load(actionDefinitionsReader, false);
#else
                        standardActions = WixActionRowCollection.Load(actionDefinitionsReader, true);
#endif
                    }
                    finally
                    {
                        if (null != actionDefinitionsReader)
                        {
                            actionDefinitionsReader.Close();
                        }
                    }
                }
            }

            return(standardActions);
        }
        /// <summary>
        /// Gets the standard actions stored in this assembly.
        /// </summary>
        /// <returns>Collection of standard actions in this assembly.</returns>
        public static WixActionRowCollection GetStandardActions()
        {
            lock (lockObject)
            {
                if (null == standardActions)
                {
                    using (XmlReader reader = XmlReader.Create(Assembly.GetExecutingAssembly().GetManifestResourceStream("WixToolset.Data.Data.actions.xml")))
                    {
                        standardActions = WixActionRowCollection.Load(reader);
                    }
                }
            }

            return(standardActions);
        }
        /// <summary>
        /// Gets the standard actions stored in this assembly.
        /// </summary>
        /// <returns>Collection of standard actions in this assembly.</returns>
        public static WixActionRowCollection GetStandardActionRows()
        {
#if REVISIT_FOR_PATCHING
            lock (lockObject)
            {
                if (null == WindowsInstallerStandardInternal.standardActions)
                {
                    using (XmlReader reader = XmlReader.Create(Assembly.GetExecutingAssembly().GetManifestResourceStream("WixToolset.Core.WindowsInstaller.Data.actions.xml")))
                    {
                        WindowsInstallerStandardInternal.standardActions = WixActionRowCollection.Load(reader);
                    }
                }
            }

            return(WindowsInstallerStandardInternal.standardActions);
#endif
            throw new NotImplementedException();
        }
Beispiel #4
0
        /// <summary>
        /// Gets the standard actions stored in this assembly.
        /// </summary>
        /// <returns>Collection of standard actions in this assembly.</returns>
        internal static WixActionRowCollection GetStandardActions()
        {
            if (null == standardActions)
            {
                Assembly assembly = Assembly.GetExecutingAssembly();
                XmlReader actionDefinitionsReader = null;

                try
                {
                    actionDefinitionsReader = new XmlTextReader(assembly.GetManifestResourceStream("Microsoft.Tools.WindowsInstallerXml.Data.actions.xml"));
            #if DEBUG
                    standardActions = WixActionRowCollection.Load(actionDefinitionsReader, false);
            #else
                    standardActions = WixActionRowCollection.Load(actionDefinitionsReader, true);
            #endif
                }
                finally
                {
                    if (null != actionDefinitionsReader)
                    {
                        actionDefinitionsReader.Close();
                    }
                }
            }

            return standardActions;
        }