コード例 #1
0
        // If your activity returns a value, derive from CodeActivity<TResult>
        // and return the value from the Execute method.
        protected override void Execute(CodeActivityContext context)
        {
            //(Workspace.Get(context)).TryGetLocalItemForServerItem(
            RegistrationHelper registrationHelper = new RegistrationHelper();
            string             appName            = ApplicationName.Get(context);
            string             tlb = TLB.Get(context);

            string comAssemblyPath = COMAssembly.Get(context);

            if (InstallAssembly.Get(context))
            {
                registrationHelper.InstallAssembly(comAssemblyPath, ref appName, ref tlb, InstallationFlags.Default);
                ApplicationName.Set(context, appName);
                TLB.Set(context, tlb);
            }
            else
            {
                registrationHelper.UninstallAssembly(comAssemblyPath, appName);
            }
        }
コード例 #2
0
 public void Setup()
 {
     installTask = new InstallAssembly();
 }