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
- WaitForChangedResult.cs
- CommentAction.cs
- EventMappingSettings.cs
- ExpanderAutomationPeer.cs
- XmlArrayAttribute.cs
- CustomAttributeFormatException.cs
- PageRequestManager.cs
- NameValueConfigurationElement.cs
- BooleanConverter.cs
- AnimationException.cs
- PenThreadWorker.cs
- ClientSettingsSection.cs
- EntityKey.cs
- IProvider.cs
- ObjectTypeMapping.cs
- CancelEventArgs.cs
- EmptyStringExpandableObjectConverter.cs
- FilterElement.cs
- CustomAttributeBuilder.cs
- MailMessage.cs
- ToolStripDropDownMenu.cs
- ReadContentAsBinaryHelper.cs
- DBSqlParserColumn.cs
- PointLight.cs
- FileIOPermission.cs
- Renderer.cs
- PropertyPathConverter.cs
- DPCustomTypeDescriptor.cs
- SafeArrayRankMismatchException.cs
- MultipartIdentifier.cs
- HttpEncoder.cs
- GreaterThanOrEqual.cs
- XPathDocumentBuilder.cs
- DBCSCodePageEncoding.cs
- ModuleBuilder.cs
- TextBoxAutoCompleteSourceConverter.cs
- EventListener.cs
- HttpRawResponse.cs
- SkinBuilder.cs
- HttpProfileGroupBase.cs
- Int32Rect.cs
- BezierSegment.cs
- VerticalAlignConverter.cs
- Update.cs
- PartDesigner.cs
- CopyNodeSetAction.cs
- LocatorBase.cs
- TrustSection.cs
- CompensatableTransactionScopeActivityDesigner.cs
- Propagator.ExtentPlaceholderCreator.cs
- _IPv6Address.cs
- DataMisalignedException.cs
- ErrorHandler.cs
- TypeElement.cs
- TextTreeText.cs
- PipeStream.cs
- EndpointAddressMessageFilter.cs
- CngKey.cs
- FileSystemEventArgs.cs
- SurrogateEncoder.cs
- ComponentDispatcher.cs
- ScrollData.cs
- Rule.cs
- DataControlImageButton.cs
- DateTimeFormatInfo.cs
- SystemIcmpV6Statistics.cs
- ServerValidateEventArgs.cs
- NegotiationTokenAuthenticator.cs
- ConstructorNeedsTagAttribute.cs
- ObjectKeyFrameCollection.cs
- ApplicationSettingsBase.cs
- ViewLoader.cs
- ImageMap.cs
- SnapLine.cs
- DataGridViewCellValidatingEventArgs.cs
- BaseTemplateCodeDomTreeGenerator.cs
- ScriptingProfileServiceSection.cs
- ItemCollection.cs
- Rfc2898DeriveBytes.cs
- RoleManagerEventArgs.cs
- LocalizationComments.cs
- altserialization.cs
- DesignerResources.cs
- CodeCatchClauseCollection.cs
- DateTimePickerDesigner.cs
- Odbc32.cs
- Typeface.cs
- SettingsPropertyIsReadOnlyException.cs
- AuthenticationService.cs
- Vector3DAnimationUsingKeyFrames.cs
- StartFileNameEditor.cs
- DataGridAutoFormatDialog.cs
- File.cs
- AnimationTimeline.cs
- SemanticResultKey.cs
- DocumentOrderQuery.cs
- RadioButtonBaseAdapter.cs
- __Error.cs
- UserControlCodeDomTreeGenerator.cs
- TableCellCollection.cs