Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Net / System / Net / Mail / SmtpAuthenticationManager.cs / 1 / 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;
}
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DetailsViewUpdatedEventArgs.cs
- MatrixTransform.cs
- OleTxTransaction.cs
- EventTask.cs
- ColumnTypeConverter.cs
- InternalControlCollection.cs
- IntSecurity.cs
- ButtonStandardAdapter.cs
- ObjectViewEntityCollectionData.cs
- milexports.cs
- AnonymousIdentificationModule.cs
- HttpCapabilitiesSectionHandler.cs
- SessionEndingEventArgs.cs
- SecurityCriticalDataForSet.cs
- ByteAnimation.cs
- FormViewUpdatedEventArgs.cs
- RecordsAffectedEventArgs.cs
- TcpTransportElement.cs
- DPCustomTypeDescriptor.cs
- AddInContractAttribute.cs
- DataServiceHostWrapper.cs
- EntityKey.cs
- HTMLTagNameToTypeMapper.cs
- ProcessThread.cs
- LogWriteRestartAreaAsyncResult.cs
- FileLevelControlBuilderAttribute.cs
- PropertyPath.cs
- GenericUI.cs
- RepeatInfo.cs
- PersistenceException.cs
- _ChunkParse.cs
- MailHeaderInfo.cs
- InstanceContext.cs
- OutputScope.cs
- CqlLexer.cs
- EventLogEntry.cs
- TextRange.cs
- DbRetry.cs
- RouteValueDictionary.cs
- XmlQueryTypeFactory.cs
- SubMenuStyleCollection.cs
- ResourceExpressionEditor.cs
- XmlSchemaSet.cs
- ActivationServices.cs
- GlyphTypeface.cs
- DataListCommandEventArgs.cs
- SQLInt32Storage.cs
- KeyNotFoundException.cs
- HttpCapabilitiesBase.cs
- SchemaElementLookUpTableEnumerator.cs
- SingleStorage.cs
- PrintPageEvent.cs
- Size.cs
- ValidationHelper.cs
- WebPartUtil.cs
- TimeoutConverter.cs
- GregorianCalendarHelper.cs
- DetailsViewDeleteEventArgs.cs
- WrappingXamlSchemaContext.cs
- MenuItemCollection.cs
- DragStartedEventArgs.cs
- SystemUdpStatistics.cs
- ListView.cs
- ComAdminInterfaces.cs
- CompositeCollectionView.cs
- ResourcePermissionBaseEntry.cs
- DetailsViewModeEventArgs.cs
- WindowsProgressbar.cs
- DataSetMappper.cs
- SelectionBorderGlyph.cs
- DataObjectEventArgs.cs
- DesignTimeValidationFeature.cs
- MulticastNotSupportedException.cs
- _ProxyChain.cs
- StateMachineSubscription.cs
- AppDomainCompilerProxy.cs
- ToolTipService.cs
- AssemblyName.cs
- FixedBufferAttribute.cs
- _IPv6Address.cs
- Rijndael.cs
- WebProxyScriptElement.cs
- DataSourceXmlSubItemAttribute.cs
- ConfigXmlCDataSection.cs
- TransactionManager.cs
- AssociationSet.cs
- ConstrainedDataObject.cs
- Lasso.cs
- EFDataModelProvider.cs
- LoginName.cs
- KeyToListMap.cs
- InputScopeNameConverter.cs
- PeerChannelListener.cs
- Merger.cs
- DataGridCellClipboardEventArgs.cs
- EncryptedType.cs
- BaseParagraph.cs
- SqlParameterCollection.cs
- CellRelation.cs
- IncomingWebResponseContext.cs