當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。