Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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;
}
}
}
}
// 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
- ParallelTimeline.cs
- WebPartCloseVerb.cs
- StringBuilder.cs
- XmlAggregates.cs
- TemplateField.cs
- ToolStripOverflow.cs
- FontStretches.cs
- StylusShape.cs
- PeerNodeAddress.cs
- JsonQueryStringConverter.cs
- IPHostEntry.cs
- TemplateField.cs
- TransformCollection.cs
- EntityProviderServices.cs
- Process.cs
- TemplatePartAttribute.cs
- EmptyQuery.cs
- XsdDuration.cs
- columnmapkeybuilder.cs
- InputScopeConverter.cs
- FirstMatchCodeGroup.cs
- ProfileParameter.cs
- GridItem.cs
- FixedSOMGroup.cs
- ManagementOptions.cs
- BCryptNative.cs
- EtwTrace.cs
- KeyGestureValueSerializer.cs
- TypePresenter.xaml.cs
- DebugHandleTracker.cs
- ReadOnlyDataSource.cs
- DatagridviewDisplayedBandsData.cs
- InputProviderSite.cs
- ListParaClient.cs
- EdmConstants.cs
- AmbientValueAttribute.cs
- XmlCountingReader.cs
- HtmlWindow.cs
- CodeTypeReferenceExpression.cs
- ImportContext.cs
- Model3DGroup.cs
- WebFormsRootDesigner.cs
- HostTimeoutsElement.cs
- SoapAttributeOverrides.cs
- Point3DValueSerializer.cs
- InstanceData.cs
- DiagnosticTrace.cs
- Activator.cs
- DependencyObjectType.cs
- CachedCompositeFamily.cs
- HttpConfigurationSystem.cs
- Int16AnimationBase.cs
- DataBoundLiteralControl.cs
- PersistChildrenAttribute.cs
- RawStylusInput.cs
- UIntPtr.cs
- ConditionCollection.cs
- UpdateProgress.cs
- TextRunCache.cs
- CollectionViewSource.cs
- DrawingGroup.cs
- FastPropertyAccessor.cs
- CompilerParameters.cs
- ConstraintStruct.cs
- TableHeaderCell.cs
- TemplatePropertyEntry.cs
- Vector3DAnimation.cs
- LeftCellWrapper.cs
- ToolStripDropDownItem.cs
- DataGridViewLayoutData.cs
- DataControlLinkButton.cs
- ReceiveMessageRecord.cs
- MenuItemStyleCollectionEditor.cs
- BaseTemplateBuildProvider.cs
- ProviderCollection.cs
- MonthCalendar.cs
- CompositeControl.cs
- UseLicense.cs
- DataBoundLiteralControl.cs
- IntSecurity.cs
- ObjectCacheSettings.cs
- DefinitionBase.cs
- InkCollectionBehavior.cs
- TableNameAttribute.cs
- ToolStripMenuItem.cs
- CheckedListBox.cs
- Int32AnimationUsingKeyFrames.cs
- XmlSerializationReader.cs
- PeerCollaboration.cs
- ArgumentValueSerializer.cs
- QueryInterceptorAttribute.cs
- ContentFilePart.cs
- SettingsPropertyValue.cs
- MetadataPropertyvalue.cs
- Configuration.cs
- MatrixCamera.cs
- InputLanguageProfileNotifySink.cs
- KeyValueInternalCollection.cs
- ComEventsSink.cs
- ArrayElementGridEntry.cs