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
- MethodToken.cs
- CodeTypeReference.cs
- X509Chain.cs
- AdRotatorDesigner.cs
- HttpConfigurationSystem.cs
- ClientFormsIdentity.cs
- XmlSiteMapProvider.cs
- ListItem.cs
- Monitor.cs
- EndEvent.cs
- HostTimeoutsElement.cs
- RoutedEventArgs.cs
- LazyInitializer.cs
- SessionParameter.cs
- SQLBoolean.cs
- TCEAdapterGenerator.cs
- XmlSchemaImporter.cs
- SqlXmlStorage.cs
- RoleGroupCollection.cs
- WrappedKeySecurityTokenParameters.cs
- ManipulationBoundaryFeedbackEventArgs.cs
- XmlEncodedRawTextWriter.cs
- FigureParaClient.cs
- CursorConverter.cs
- PriorityQueue.cs
- TextFindEngine.cs
- SafeThemeHandle.cs
- CollectionBase.cs
- DisposableCollectionWrapper.cs
- FreezableDefaultValueFactory.cs
- RawStylusInputReport.cs
- DataGridRowHeader.cs
- ConstrainedGroup.cs
- SelectingProviderEventArgs.cs
- TemplateEditingVerb.cs
- XmlValueConverter.cs
- TraceInternal.cs
- HtmlWindow.cs
- Events.cs
- SqlAliasesReferenced.cs
- CellTreeNode.cs
- PageSetupDialog.cs
- EntityDataSourceViewSchema.cs
- XmlTextWriter.cs
- SerialPinChanges.cs
- AnnotationResourceCollection.cs
- DataContractJsonSerializer.cs
- ColumnHeader.cs
- FigureParaClient.cs
- SamlSecurityToken.cs
- Parser.cs
- XmlIlGenerator.cs
- SmtpNtlmAuthenticationModule.cs
- ClientSettings.cs
- TextViewSelectionProcessor.cs
- AccessDataSource.cs
- GridViewUpdateEventArgs.cs
- DataGridView.cs
- CategoryEditor.cs
- ToolStripItemClickedEventArgs.cs
- Control.cs
- TiffBitmapDecoder.cs
- Variable.cs
- EntityException.cs
- ApplicationServiceManager.cs
- CurrentChangingEventManager.cs
- ElementMarkupObject.cs
- EtwTrace.cs
- SliderAutomationPeer.cs
- StringKeyFrameCollection.cs
- StoreAnnotationsMap.cs
- Size3D.cs
- WindowsGraphicsCacheManager.cs
- SqlDataAdapter.cs
- EncoderFallback.cs
- NamespaceInfo.cs
- FindCriteriaCD1.cs
- SHA1CryptoServiceProvider.cs
- StreamGeometry.cs
- ClientSection.cs
- TextElement.cs
- AliasedExpr.cs
- MulticastDelegate.cs
- SqlPersonalizationProvider.cs
- RoleServiceManager.cs
- SiteMapNode.cs
- OleDbConnectionInternal.cs
- Point3DConverter.cs
- FaultDescription.cs
- CompilerResults.cs
- ByteAnimationUsingKeyFrames.cs
- CatalogZone.cs
- PointHitTestResult.cs
- Stopwatch.cs
- Exception.cs
- Form.cs
- HtmlContainerControl.cs
- XmlWriterDelegator.cs
- MouseGesture.cs
- VectorAnimationUsingKeyFrames.cs