Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- DataGridViewTextBoxColumn.cs
- CapabilitiesRule.cs
- ObjectQuery_EntitySqlExtensions.cs
- DataGridViewColumnConverter.cs
- MonthChangedEventArgs.cs
- AppDomain.cs
- FormViewPageEventArgs.cs
- IOException.cs
- StateRuntime.cs
- SqlErrorCollection.cs
- UnmanagedMemoryStreamWrapper.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- NullableConverter.cs
- FieldBuilder.cs
- CardSpaceShim.cs
- MessageHeader.cs
- BinaryReader.cs
- BitmapFrameDecode.cs
- InternalsVisibleToAttribute.cs
- SamlSerializer.cs
- MediaPlayer.cs
- PageCatalogPart.cs
- AspNetHostingPermission.cs
- ProcessModelInfo.cs
- DesignerLoader.cs
- ClientTargetCollection.cs
- unsafeIndexingFilterStream.cs
- ModuleBuilder.cs
- Lease.cs
- EntityTransaction.cs
- Vector3DConverter.cs
- ChangePassword.cs
- XsdDataContractImporter.cs
- FileSystemEventArgs.cs
- Wildcard.cs
- PriorityQueue.cs
- PrintController.cs
- XmlResolver.cs
- FolderBrowserDialog.cs
- TaskForm.cs
- ColumnReorderedEventArgs.cs
- ColumnBinding.cs
- InputMethod.cs
- SoapObjectReader.cs
- Compilation.cs
- InputBinder.cs
- IApplicationTrustManager.cs
- StringFormat.cs
- BitmapEffectInputData.cs
- Pen.cs
- EdmItemCollection.cs
- CacheAxisQuery.cs
- EditorServiceContext.cs
- SuppressIldasmAttribute.cs
- TextMarkerSource.cs
- OwnerDrawPropertyBag.cs
- SchemaInfo.cs
- DebugController.cs
- WorkerRequest.cs
- EntityViewGenerator.cs
- JpegBitmapEncoder.cs
- BaseTreeIterator.cs
- SiteMapPath.cs
- CompoundFileStreamReference.cs
- TemplateControlParser.cs
- ToolStripProgressBar.cs
- MaskInputRejectedEventArgs.cs
- MouseGestureConverter.cs
- XmlSchemaSimpleType.cs
- BaseHashHelper.cs
- AddInController.cs
- ConfigurationManagerInternalFactory.cs
- BitmapCodecInfoInternal.cs
- WebPartZone.cs
- HMACRIPEMD160.cs
- Parameter.cs
- LowerCaseStringConverter.cs
- WindowsUpDown.cs
- XmlSchemaComplexType.cs
- FilteredDataSetHelper.cs
- XmlSerializableReader.cs
- SizeConverter.cs
- OleDbConnectionInternal.cs
- StrokeNodeOperations2.cs
- RegularExpressionValidator.cs
- XmlSchemaAny.cs
- DataFieldEditor.cs
- StringDictionaryWithComparer.cs
- Thread.cs
- FixedHyperLink.cs
- CheckBoxAutomationPeer.cs
- OracleConnectionFactory.cs
- NetworkStream.cs
- ObjectDataProvider.cs
- HtmlElement.cs
- MsmqIntegrationSecurityElement.cs
- AliasedExpr.cs
- ServiceProviders.cs
- BaseTemplateBuildProvider.cs
- DecimalStorage.cs