public override void ExecuteDelete() { if (SelectedModule != null) { ModuleInfoBLL bll = new ModuleInfoBLL(); if (bll.DeleteModuleInfo(SelectedModule)) { ModuleList.Remove(SelectedModule); SelectedModule = null; } } }
public void ReturnsFalseWhenNotRemoved() { // Given CountModule count = new CountModule("A"); CountModule count2 = new CountModule("B"); ModuleList list = new ModuleList(count2); // When bool result = list.Remove(count); // Then Assert.That(result, Is.False); Assert.That(list, Is.EqualTo(new [] { count2 })); }
public static void Unregister(IAuthenticationModule authenticationModule) { ExceptionHelper.UnmanagedPermission.Demand(); if (authenticationModule == null) { throw new ArgumentNullException("authenticationModule"); } lock (s_ModuleBinding) { if (!ModuleList.Contains(authenticationModule)) { throw new InvalidOperationException(SR.GetString("net_authmodulenotregistered")); } ModuleList.Remove(authenticationModule); } }
public void RemovesModuleByName() { // Given CountModule count = new CountModule("A"); CountModule count2 = new CountModule("B"); ModuleList list = new ModuleList( new NamedModule("A", count), new NamedModule("B", count2)); // When bool result = list.Remove("A"); // Then Assert.That(result, Is.True); Assert.That(list, Is.EqualTo(new [] { count2 })); }
// Unregister an authentication module from the authentication manager. public static void Unregister(IAuthenticationModule authenticationModule) { if (authenticationModule == null) { throw new ArgumentNullException("authenticationModule"); } lock (typeof(AuthenticationManager)) { if (!ModuleList.Contains(authenticationModule)) { throw new InvalidOperationException (S._("Invalid_AuthModuleNotRegistered")); } ModuleList.Remove(authenticationModule); } }
public static void Unregister(string authenticationScheme) { ExceptionHelper.UnmanagedPermission.Demand(); if (authenticationScheme == null) { throw new ArgumentNullException("authenticationScheme"); } lock (s_ModuleBinding) { IAuthenticationModule module = findModule(authenticationScheme); if (module == null) { throw new InvalidOperationException(SR.GetString("net_authschemenotregistered")); } ModuleList.Remove(module); } }
public static void Register(IAuthenticationModule authenticationModule) { ExceptionHelper.UnmanagedPermission.Demand(); if (authenticationModule == null) { throw new ArgumentNullException("authenticationModule"); } lock (s_ModuleBinding) { IAuthenticationModule module = findModule(authenticationModule.AuthenticationType); if (module != null) { ModuleList.Remove(module); } ModuleList.Add(authenticationModule); } }
// Register an authentication module with the authentication manager. public static void Register(IAuthenticationModule authenticationModule) { if (authenticationModule == null) { throw new ArgumentNullException("authenticationModule"); } lock (typeof(AuthenticationManager)) { IAuthenticationModule module; module = FindModuleByType (authenticationModule.AuthenticationType); if (module != null) { ModuleList.Remove(module); } ModuleList.Add(authenticationModule); } }
public void ClosePage(string pageName) { var module = ModuleList.FirstOrDefault(t => t.Name.Equals(pageName)); if (module != null) { ModuleList.Remove(module); if (ModuleList.Count > 0) { CurrentModule = ModuleList[ModuleList.Count - 1]; } else { CurrentModule = null; } GCSettings.LargeObjectHeapCompactionMode = GCLargeObjectHeapCompactionMode.CompactOnce; GC.Collect(); } }
// Unregister an authentication module for a particular scheme. public static void Unregister(String authenticationScheme) { if (authenticationScheme == null) { throw new ArgumentNullException("authenticationScheme"); } lock (typeof(AuthenticationManager)) { IAuthenticationModule module; module = FindModuleByType(authenticationScheme); if (module != null) { ModuleList.Remove(module); } else { throw new InvalidOperationException (S._("Invalid_AuthModuleNotRegistered")); } } }