Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- SoapEnumAttribute.cs
- WebPartPersonalization.cs
- PersonalizationDictionary.cs
- Gdiplus.cs
- XmlReader.cs
- EnvironmentPermission.cs
- shaper.cs
- VectorAnimationUsingKeyFrames.cs
- SQLInt32Storage.cs
- SerializerWriterEventHandlers.cs
- PanelContainerDesigner.cs
- UnionCodeGroup.cs
- VisualTreeHelper.cs
- HostingEnvironment.cs
- BitmapCache.cs
- PartialTrustVisibleAssembliesSection.cs
- DocumentViewerBaseAutomationPeer.cs
- ApplicationId.cs
- MLangCodePageEncoding.cs
- SQLResource.cs
- HyperLinkColumn.cs
- GeneralTransform3D.cs
- FolderLevelBuildProvider.cs
- Stroke2.cs
- WindowsListViewItemCheckBox.cs
- WebPartUserCapability.cs
- OpCodes.cs
- invalidudtexception.cs
- SqlParameterizer.cs
- MouseBinding.cs
- DataDocumentXPathNavigator.cs
- FlowDocumentPageViewerAutomationPeer.cs
- TextWriter.cs
- WorkflowRuntimeServiceElement.cs
- EvidenceBase.cs
- Console.cs
- XmlSchemaRedefine.cs
- CustomValidator.cs
- MailWriter.cs
- Convert.cs
- PeerTransportListenAddressConverter.cs
- BamlRecordWriter.cs
- SecurityElement.cs
- SerializationInfo.cs
- DataGridViewRowStateChangedEventArgs.cs
- PageAsyncTaskManager.cs
- FamilyMap.cs
- WorkflowMarkupElementEventArgs.cs
- WindowsUserNameSecurityTokenAuthenticator.cs
- MdiWindowListItemConverter.cs
- AssemblyCache.cs
- PointCollection.cs
- GridProviderWrapper.cs
- DataKey.cs
- ColorMap.cs
- XPathSelfQuery.cs
- XmlAnyElementAttribute.cs
- ArgumentOutOfRangeException.cs
- SmtpException.cs
- FormsAuthenticationCredentials.cs
- UIElementParaClient.cs
- SqlDataSourceQuery.cs
- UtilityExtension.cs
- EventLog.cs
- LayoutTableCell.cs
- WeakReferenceList.cs
- DbConnectionStringCommon.cs
- PaperSize.cs
- WebResourceAttribute.cs
- EntityTypeEmitter.cs
- Stroke2.cs
- DiagnosticsElement.cs
- PageCodeDomTreeGenerator.cs
- WindowsListViewSubItem.cs
- PointConverter.cs
- Latin1Encoding.cs
- ReadWriteSpinLock.cs
- ArrayItemValue.cs
- XmlCharacterData.cs
- SevenBitStream.cs
- Codec.cs
- HandlerBase.cs
- HtmlContainerControl.cs
- UrlPath.cs
- AttributeUsageAttribute.cs
- WebServiceResponse.cs
- FormViewCommandEventArgs.cs
- HwndMouseInputProvider.cs
- GlyphInfoList.cs
- StyleTypedPropertyAttribute.cs
- FileStream.cs
- MailAddressParser.cs
- AssociationSet.cs
- Model3DCollection.cs
- WebPartDisplayModeEventArgs.cs
- XPathNodeHelper.cs
- PathFigureCollection.cs
- X509ChainPolicy.cs
- XmlValidatingReaderImpl.cs
- ConfigXmlWhitespace.cs