Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Net / System / Net / Mail / SmtpAuthenticationManager.cs / 1305376 / SmtpAuthenticationManager.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Net.Mail { using System; using System.Collections; using System.IO; using System.Net; internal static class SmtpAuthenticationManager { static ArrayList modules = new ArrayList(); static SmtpAuthenticationManager() { // #if !FEATURE_PAL if (ComNetOS.IsWin2K) { // Negotiate supported only if Win2K or later Register(new SmtpNegotiateAuthenticationModule()); } Register(new SmtpNtlmAuthenticationModule()); Register(new SmtpDigestAuthenticationModule()); #endif // !FEATURE_PAL Register(new SmtpLoginAuthenticationModule()); } internal static void Register(ISmtpAuthenticationModule module) { if (module == null) throw new ArgumentNullException("module"); lock (modules) { modules.Add(module); } } /* // Consider removing. internal static void Unregister(ISmtpAuthenticationModule module) { if (module == null) throw new ArgumentNullException("module"); lock (modules) { modules.Remove(module); } } */ /* // Consider removing. internal static void Unregister(string authenticationType) { if (authenticationType == null) throw new ArgumentNullException("authenticationType"); lock (modules) { foreach (ISmtpAuthenticationModule module in modules) { if (0 == string.Compare(module.AuthenticationType, authenticationType, StringComparison.OrdinalIgnoreCase)) { modules.Remove(module); } } } } */ internal static ISmtpAuthenticationModule[] GetModules() { lock (modules) { ISmtpAuthenticationModule[] copy = new ISmtpAuthenticationModule[modules.Count]; modules.CopyTo(0, copy, 0, modules.Count); return copy; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Net.Mail { using System; using System.Collections; using System.IO; using System.Net; internal static class SmtpAuthenticationManager { static ArrayList modules = new ArrayList(); static SmtpAuthenticationManager() { // #if !FEATURE_PAL if (ComNetOS.IsWin2K) { // Negotiate supported only if Win2K or later Register(new SmtpNegotiateAuthenticationModule()); } Register(new SmtpNtlmAuthenticationModule()); Register(new SmtpDigestAuthenticationModule()); #endif // !FEATURE_PAL Register(new SmtpLoginAuthenticationModule()); } internal static void Register(ISmtpAuthenticationModule module) { if (module == null) throw new ArgumentNullException("module"); lock (modules) { modules.Add(module); } } /* // Consider removing. internal static void Unregister(ISmtpAuthenticationModule module) { if (module == null) throw new ArgumentNullException("module"); lock (modules) { modules.Remove(module); } } */ /* // Consider removing. internal static void Unregister(string authenticationType) { if (authenticationType == null) throw new ArgumentNullException("authenticationType"); lock (modules) { foreach (ISmtpAuthenticationModule module in modules) { if (0 == string.Compare(module.AuthenticationType, authenticationType, StringComparison.OrdinalIgnoreCase)) { modules.Remove(module); } } } } */ internal static ISmtpAuthenticationModule[] GetModules() { lock (modules) { ISmtpAuthenticationModule[] copy = new ISmtpAuthenticationModule[modules.Count]; modules.CopyTo(0, copy, 0, modules.Count); return copy; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SoapIncludeAttribute.cs
- StateDesigner.cs
- OpenFileDialog.cs
- XmlNodeReader.cs
- List.cs
- DiscoveryRequestHandler.cs
- FieldNameLookup.cs
- QueryStatement.cs
- Selector.cs
- EventsTab.cs
- SerializationEventsCache.cs
- HostElement.cs
- SvcMapFileLoader.cs
- ExpressionEditorAttribute.cs
- ProcessHost.cs
- CapabilitiesState.cs
- TypeExtensionConverter.cs
- PointLight.cs
- ToolStripRenderEventArgs.cs
- FontUnit.cs
- LocalizationParserHooks.cs
- CodePageUtils.cs
- Int32.cs
- Graphics.cs
- XhtmlBasicPhoneCallAdapter.cs
- MessageSmuggler.cs
- SqlConnectionManager.cs
- TypeExtensionConverter.cs
- TextSearch.cs
- DataRowChangeEvent.cs
- PolyLineSegment.cs
- PathGeometry.cs
- xsdvalidator.cs
- _DisconnectOverlappedAsyncResult.cs
- TargetControlTypeAttribute.cs
- WindowsScrollBar.cs
- BindToObject.cs
- Path.cs
- UnhandledExceptionEventArgs.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- Win32.cs
- EntityConnection.cs
- InkPresenter.cs
- HiddenFieldPageStatePersister.cs
- GridErrorDlg.cs
- TextTreeObjectNode.cs
- BaseAddressElementCollection.cs
- UpdatePanel.cs
- DataGridViewUtilities.cs
- PixelFormatConverter.cs
- PopupControlService.cs
- ImageKeyConverter.cs
- SQLDecimalStorage.cs
- OutputCacheProfile.cs
- ComplexObject.cs
- XmlDownloadManager.cs
- UIPropertyMetadata.cs
- FlagsAttribute.cs
- Types.cs
- DelegatingTypeDescriptionProvider.cs
- SizeKeyFrameCollection.cs
- StringCollection.cs
- UIElementHelper.cs
- PopOutPanel.cs
- SerializationBinder.cs
- BuildManager.cs
- SingleConverter.cs
- TypeToStringValueConverter.cs
- VisualBasicSettingsHandler.cs
- XmlSerializerNamespaces.cs
- XmlNodeComparer.cs
- WindowsHyperlink.cs
- _SecureChannel.cs
- AssociatedControlConverter.cs
- FileInfo.cs
- SupportsEventValidationAttribute.cs
- XPathMultyIterator.cs
- TimeoutException.cs
- WindowsImpersonationContext.cs
- ObjectNavigationPropertyMapping.cs
- HttpWriter.cs
- itemelement.cs
- HttpStreams.cs
- InternalDuplexChannelFactory.cs
- CharacterHit.cs
- DispatchWrapper.cs
- SqlConnectionString.cs
- FlowDocumentPageViewerAutomationPeer.cs
- RowParagraph.cs
- SelectionProcessor.cs
- DataRowChangeEvent.cs
- SqlClientWrapperSmiStream.cs
- CombinedHttpChannel.cs
- CLRBindingWorker.cs
- HttpHandlerActionCollection.cs
- FixedPageProcessor.cs
- XmlSchemaSimpleTypeList.cs
- SecurityDocument.cs
- WindowsFormsSectionHandler.cs
- DbMetaDataColumnNames.cs