Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TagPrefixCollection.cs
- BrowserCapabilitiesFactory.cs
- ExecutionEngineException.cs
- EntityContainerEntitySet.cs
- SchemaCollectionPreprocessor.cs
- TranslateTransform3D.cs
- mansign.cs
- DependencyPropertyConverter.cs
- DrawingImage.cs
- TextFormattingConverter.cs
- ToolStripPanelSelectionGlyph.cs
- OutputScopeManager.cs
- StateItem.cs
- StaticFileHandler.cs
- GetIndexBinder.cs
- TypeForwardedToAttribute.cs
- ConnectionProviderAttribute.cs
- RowsCopiedEventArgs.cs
- DateTimeFormatInfoScanner.cs
- ThreadAttributes.cs
- SqlUnionizer.cs
- IntellisenseTextBox.designer.cs
- WindowsRebar.cs
- DNS.cs
- ProxyWebPartManagerDesigner.cs
- RelatedEnd.cs
- RemotingException.cs
- RelativeSource.cs
- SqlDataAdapter.cs
- UrlMappingsModule.cs
- ConfigurationPropertyCollection.cs
- SimpleHandlerBuildProvider.cs
- HandlerMappingMemo.cs
- ChannelBinding.cs
- ThumbAutomationPeer.cs
- XmlDownloadManager.cs
- RawStylusInput.cs
- CompilationSection.cs
- BitmapSourceSafeMILHandle.cs
- SafeNativeMethods.cs
- NamedPermissionSet.cs
- BinaryFormatterWriter.cs
- TextTrailingCharacterEllipsis.cs
- SizeFConverter.cs
- DoubleAnimationUsingPath.cs
- GacUtil.cs
- PublisherIdentityPermission.cs
- VariableAction.cs
- WinEventTracker.cs
- RegistrySecurity.cs
- ControlCachePolicy.cs
- ActiveXHelper.cs
- ToolstripProfessionalRenderer.cs
- DataServiceSaveChangesEventArgs.cs
- MemberDomainMap.cs
- StorageScalarPropertyMapping.cs
- GenericTypeParameterBuilder.cs
- SecurityPermission.cs
- CompiledIdentityConstraint.cs
- ControlBindingsCollection.cs
- CompositionDesigner.cs
- HotSpot.cs
- PrintPreviewControl.cs
- PriorityRange.cs
- CompatibleIComparer.cs
- XmlSchemaObject.cs
- PasswordDeriveBytes.cs
- PkcsMisc.cs
- UpdateCommandGenerator.cs
- Monitor.cs
- XPathAxisIterator.cs
- ArraySet.cs
- Size3DValueSerializer.cs
- SspiNegotiationTokenAuthenticator.cs
- Size3DConverter.cs
- SynthesizerStateChangedEventArgs.cs
- AsyncResult.cs
- RoleManagerModule.cs
- FormViewInsertedEventArgs.cs
- xamlnodes.cs
- WebControl.cs
- ColorAnimationBase.cs
- TransformPattern.cs
- ServiceDescriptionData.cs
- WpfMemberInvoker.cs
- CallbackHandler.cs
- EntityClassGenerator.cs
- ZipPackage.cs
- ToolStripContainerActionList.cs
- DataQuery.cs
- UiaCoreApi.cs
- CaseStatementSlot.cs
- QuaternionAnimation.cs
- BinaryReader.cs
- ServiceModelSecurityTokenTypes.cs
- XmlSchemaInclude.cs
- ReadOnlyDictionary.cs
- SqlMultiplexer.cs
- ObjectListFieldsPage.cs
- Matrix3DValueSerializer.cs