System.Security.AccessControl.EventWaitHandleSecurity.AddAccessRule C# (CSharp) Method

AddAccessRule() public method

public AddAccessRule ( EventWaitHandleAccessRule rule ) : void
rule EventWaitHandleAccessRule
return void
        public void AddAccessRule(EventWaitHandleAccessRule rule)
        {
            base.AddAccessRule(rule);
        }

Same methods

EventWaitHandleSecurity::AddAccessRule ( System rule ) : void

Usage Example

Example #1
0
        public Installer(string filename)
        {
            try {
                MsiFilename = filename;
                Task.Factory.StartNew(() => {
                    // was coapp just installed by the bootstrapper?
                    if (((AppDomain.CurrentDomain.GetData("COAPP_INSTALLED") as string) ?? "false").IsTrue()) {
                        // we'd better make sure that the most recent version of the service is running.
                        EngineServiceManager.InstallAndStartService();
                    }
                    InstallTask = LoadPackageDetails();
                });

                bool wasCreated;
                var ewhSec = new EventWaitHandleSecurity();
                ewhSec.AddAccessRule(new EventWaitHandleAccessRule(new SecurityIdentifier(WellKnownSidType.WorldSid, null), EventWaitHandleRights.FullControl, AccessControlType.Allow));
                _ping = new EventWaitHandle(false, EventResetMode.ManualReset, "BootstrapperPing", out wasCreated, ewhSec);

                // if we got this far, CoApp must be running.
                try {
                    Application.ResourceAssembly = Assembly.GetExecutingAssembly();
                } catch {
                }

                _window = new InstallerMainWindow(this);
                _window.ShowDialog();

                if (Application.Current != null) {
                    Application.Current.Shutdown(0);
                }
                ExitQuick();
            } catch (Exception e) {
                DoError(InstallerFailureState.FailedToGetPackageDetails, e);
            }
        }
All Usage Examples Of System.Security.AccessControl.EventWaitHandleSecurity::AddAccessRule