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
- ContextStaticAttribute.cs
- FormatSettings.cs
- Size3DConverter.cs
- WindowExtensionMethods.cs
- GenericNameHandler.cs
- DataRecordInternal.cs
- StateMachineWorkflowInstance.cs
- RecognizedAudio.cs
- TableLayoutSettingsTypeConverter.cs
- SplayTreeNode.cs
- ThicknessAnimationBase.cs
- ADConnectionHelper.cs
- TemplateColumn.cs
- DbMetaDataCollectionNames.cs
- WorkflowOwnershipException.cs
- HeaderCollection.cs
- ResourceFallbackManager.cs
- PieceNameHelper.cs
- XamlReaderHelper.cs
- NumericUpDownAccelerationCollection.cs
- TimeoutTimer.cs
- autovalidator.cs
- NotSupportedException.cs
- AnonymousIdentificationModule.cs
- OutputCacheProfile.cs
- HostProtectionException.cs
- BitmapEffectGeneralTransform.cs
- TTSEvent.cs
- ProcessThread.cs
- DataSourceCache.cs
- StoragePropertyMapping.cs
- SmtpClient.cs
- entityreference_tresulttype.cs
- Thickness.cs
- RelativeSource.cs
- BamlLocalizableResourceKey.cs
- RefreshEventArgs.cs
- OracleLob.cs
- DataGridViewCellValueEventArgs.cs
- Ref.cs
- ConfigDefinitionUpdates.cs
- ImportContext.cs
- UpdatePanelTriggerCollection.cs
- Int16Converter.cs
- OperationResponse.cs
- SelectorItemAutomationPeer.cs
- WebBrowserNavigatingEventHandler.cs
- HintTextConverter.cs
- XamlSerializationHelper.cs
- PkcsUtils.cs
- TextTrailingWordEllipsis.cs
- TextTreeText.cs
- OSFeature.cs
- SQLCharsStorage.cs
- TextElement.cs
- StandardOleMarshalObject.cs
- DataBindingsDialog.cs
- ImmutableAssemblyCacheEntry.cs
- ProcessThreadCollection.cs
- HostElement.cs
- SoapHeader.cs
- GradientBrush.cs
- WebPartManagerInternals.cs
- EmptyControlCollection.cs
- SynchronizationLockException.cs
- SessionParameter.cs
- GeneralTransform3D.cs
- ConfigurationCollectionAttribute.cs
- SourceElementsCollection.cs
- propertytag.cs
- _NetRes.cs
- PackWebRequest.cs
- DataBinding.cs
- ScrollEventArgs.cs
- CacheMode.cs
- Dump.cs
- GroupBox.cs
- BmpBitmapEncoder.cs
- EllipseGeometry.cs
- TextElementEnumerator.cs
- DataGridViewColumnTypePicker.cs
- TypeUtil.cs
- XmlSchemaComplexType.cs
- ThemeConfigurationDialog.cs
- VirtualDirectoryMappingCollection.cs
- RawStylusInput.cs
- MediaEntryAttribute.cs
- ArithmeticLiteral.cs
- FileSecurity.cs
- BindingSource.cs
- TheQuery.cs
- XmlSchemaSubstitutionGroup.cs
- MobileControlDesigner.cs
- CorrelationManager.cs
- SiteMap.cs
- HitTestFilterBehavior.cs
- StylusPointProperties.cs
- SafeEventLogReadHandle.cs
- PointLight.cs
- ClientTargetSection.cs