当前位置: 首页>>代码示例>>C#>>正文


C# Install.Installer类代码示例

本文整理汇总了C#中System.Configuration.Install.Installer的典型用法代码示例。如果您正苦于以下问题:C# Installer类的具体用法?C# Installer怎么用?C# Installer使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Installer类属于System.Configuration.Install命名空间,在下文中一共展示了Installer类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: Fill

 public void Fill(Installer installer)
 {
     foreach (Installer installer2 in this.CreateInstallers(this.InstrumentedTypes))
     {
         installer.Installers.Add(installer2);
     }
 }
开发者ID:huaminglee,项目名称:myyyyshop,代码行数:7,代码来源:AbstractInstallerBuilder.cs

示例2: SetUp

	public void SetUp ()
	{
		ins = new Installer ();
		state = new Hashtable ();
		sub1 = new MyInstaller ();
		sub2 = new MyInstaller ();

		BfInstEvt = new CallInfo ();
		AfInstEvt = new CallInfo ();
		CommittingEvt = new CallInfo ();
		CommittedEvt = new CallInfo ();
		BfRbackEvt = new CallInfo ();
		AfRbackEvt = new CallInfo ();
		BfUninsEvt = new CallInfo ();
		AfUninsEvt = new CallInfo ();;

		ins.Installers.Add (sub1);
		ins.Installers.Add (sub2);

		ins.BeforeInstall += new InstallEventHandler (onBeforeInstall);
		ins.AfterInstall += new InstallEventHandler (onAfterInstall);
		ins.Committing += new InstallEventHandler (onCommitting);
		ins.Committed += new InstallEventHandler (onCommitted);
		ins.BeforeRollback += new InstallEventHandler (onBeforeRollback);
		ins.AfterRollback += new InstallEventHandler (onAfterRollback);
		ins.BeforeUninstall += new InstallEventHandler (onBeforeUninstall);
		ins.AfterUninstall += new InstallEventHandler (onAfterUninstall);
	}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:28,代码来源:InstallerTest.cs

示例3: SetUp

	public void SetUp ()
	{
		ins = new TransactedInstaller ();
		state = new Hashtable ();
		sub1 = new SucceedInstaller ();
		sub2 = new FailureInstaller ();
		sub3 = new SucceedInstaller ();

		BfInstEvt = new CallInfo ();
		AfInstEvt = new CallInfo ();
		CommittingEvt = new CallInfo ();
		CommittedEvt = new CallInfo ();
		BfRbackEvt = new CallInfo ();
		AfRbackEvt = new CallInfo ();
		BfUninsEvt = new CallInfo ();
		AfUninsEvt = new CallInfo ();

		ins.Installers.Add (sub1);
		string [] cmdLine = new string [] { "/logToConsole=false" };
		ins.Context = new InstallContext ("", cmdLine);	// no log file

		ins.BeforeInstall += new InstallEventHandler (onBeforeInstall);
		ins.AfterInstall += new InstallEventHandler (onAfterInstall);
		ins.Committing += new InstallEventHandler (onCommitting);
		ins.Committed += new InstallEventHandler (onCommitted);
		ins.BeforeRollback += new InstallEventHandler (onBeforeRollback);
		ins.AfterRollback += new InstallEventHandler (onAfterRollback);
		ins.BeforeUninstall += new InstallEventHandler (onBeforeUninstall);
		ins.AfterUninstall += new InstallEventHandler (onAfterUninstall);
	}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:30,代码来源:TransactedInstallerTest.cs

示例4: SpHostServiceInstaller

        public SpHostServiceInstaller(HostSettings settings, HostConfigurator configurator)
        {
            _hostConfigurator = configurator;

            _installer = CreateInstaller(settings);

            _transactedInstaller = CreateTransactedInstaller(_installer);
        }
开发者ID:r1pper,项目名称:Topshelf.StartParameters,代码行数:8,代码来源:SpHostServiceInstaller.cs

示例5: TypeWithNoEventLogsReturnsUnchangedInstaller

        public void TypeWithNoEventLogsReturnsUnchangedInstaller()
        {
            Installer parentInstaller = new Installer();
            EventLogInstallerBuilder builder = new EventLogInstallerBuilder(new Type[] { typeof(NoLogsType) });
            builder.Fill(parentInstaller);

            Assert.AreEqual(0, parentInstaller.Installers.Count);
        }
开发者ID:HondaBey,项目名称:EnterpriseLibrary6,代码行数:8,代码来源:EventLogInstallerBuilderFixture.cs

示例6: DBForm

 public DBForm(Installer pInstallerP)
 {
     InitializeComponent();
     LoadProvider();
     normalClose = false;
     pInstaller = pInstallerP;
     dbName = "";
 }
开发者ID:salimci,项目名称:Legacy-Remote-Recorder,代码行数:8,代码来源:DBForm.cs

示例7: ProjectInstaller

        public ProjectInstaller(Assembly appAssembly)
        {
            _installer = new Installer();
            _appAssembly = appAssembly;

            CreateSubInstallers();
            SetInstallerContext();
        }
开发者ID:arisoyang,项目名称:ncron,代码行数:8,代码来源:ProjectInstaller.cs

示例8: TypeWithNoCountersReturnsEmptyInstallers

        public void TypeWithNoCountersReturnsEmptyInstallers()
        {
            Installer parentInstaller = new Installer();
            PerformanceCounterInstallerBuilder builder
                = new PerformanceCounterInstallerBuilder(new Type[] { typeof(NoCountersType) });
            builder.Fill(parentInstaller);

            Assert.AreEqual(0, parentInstaller.Installers.Count);
        }
开发者ID:jmeckley,项目名称:Enterprise-Library-5.0,代码行数:9,代码来源:PerformanceCounterInstallerBuilderFixture.cs

示例9: uninstallService

 /// <summary>
 /// UnInstalls the Windows service with the given "installer" object.
 /// </summary>
 /// <param name="pi"></param>
 /// <param name="pathToService"></param>
 public static void uninstallService(Installer pi, string pathToService)
 {
     TransactedInstaller ti = new TransactedInstaller ();
     ti.Installers.Add (pi);
     string[] cmdline = {pathToService};
     InstallContext ctx = new InstallContext ("Uninstall.log", cmdline );
     ti.Context = ctx;
     ti.Uninstall ( null );
 }
开发者ID:abhishek-kumar,项目名称:AIGA,代码行数:14,代码来源:ServiceHelper.cs

示例10: Fill

        /// <summary>
        /// Fills the given installer with other, more specific kinds of installers that have been
        /// filled with the appropriate kinds of installable resources
        /// </summary>
        /// <param name="installer">Outer installer to be filled with nested installers for specific resources</param>
        public void Fill(Installer installer)
        {
            ICollection<Installer> installers = CreateInstallers(InstrumentedTypes);

            foreach (Installer childInstaller in installers)
            {
                installer.Installers.Add(childInstaller);
            }
        }
开发者ID:modulexcite,项目名称:Transformalize,代码行数:14,代码来源:AbstractInstallerBuilder.cs

示例11: InstallService

 /// <summary>
 /// Installs the Windows service with the given "installer" object.
 /// </summary>
 /// <param name="installer">The installer.</param>
 /// <param name="pathToService">The path to service.</param>
 public static void InstallService(Installer installer, string pathToService)
 {
     TransactedInstaller ti = new TransactedInstaller();
     ti.Installers.Add(installer);
     string[] cmdline = { pathToService };
     InstallContext ctx = new InstallContext("Install.log", cmdline);
     ti.Context = ctx;
     ti.Install(new Hashtable());
 }
开发者ID:JamesTryand,项目名称:alchemi,代码行数:14,代码来源:ServiceHelper.cs

示例12: BuildInstallers

 public static Installer[] BuildInstallers(WinServiceSettings settings)
 {
     var result = new Installer[]
                  {
                      ConfigureServiceInstaller(settings),
                      ConfigureServiceProcessInstaller(settings)
                  };
     return result;
 }
开发者ID:abombss,项目名称:Topshelf,代码行数:9,代码来源:WinServiceHelper.cs

示例13: AddRange

 public void AddRange(Installer[] value)
 {
     if (value == null)
     {
         throw new ArgumentNullException("value");
     }
     for (int i = 0; i < value.Length; i++)
     {
         this.Add(value[i]);
     }
 }
开发者ID:pritesh-mandowara-sp,项目名称:DecompliedDotNetLibraries,代码行数:11,代码来源:InstallerCollection.cs

示例14: AddRange

    // Add a range of installers to this collection.
    public void AddRange(Installer[] value)
			{
				if(value == null)
				{
					throw new ArgumentNullException("value");
				}
				foreach(Installer inst in value)
				{
					Add(inst);
				}
			}
开发者ID:jjenki11,项目名称:blaze-chem-rendering,代码行数:12,代码来源:InstallerCollection.cs

示例15: AddRange

		public void AddRange (Installer[] value) {
			if (value == null) 
			{
				throw new ArgumentNullException ("value");
			}

			for (int counter = 0; counter < value.Length; counter++)
			{
				Add (value[counter]);
			}
		}
开发者ID:nlhepler,项目名称:mono,代码行数:11,代码来源:InstallerCollection.cs


注:本文中的System.Configuration.Install.Installer类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。