Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- WebPartVerbCollection.cs
- XmlElementList.cs
- FullTextBreakpoint.cs
- JapaneseLunisolarCalendar.cs
- DesignerWithHeader.cs
- SerializationException.cs
- coordinator.cs
- PathGeometry.cs
- Operand.cs
- View.cs
- DesignerSerializerAttribute.cs
- Int32Rect.cs
- DataListItemCollection.cs
- FixedPageProcessor.cs
- ModelFunctionTypeElement.cs
- ListView.cs
- ButtonFlatAdapter.cs
- AsyncContentLoadedEventArgs.cs
- AncestorChangedEventArgs.cs
- AncestorChangedEventArgs.cs
- ProxyWebPartManager.cs
- MaterialGroup.cs
- WinEventQueueItem.cs
- ConsoleEntryPoint.cs
- ConnectionPoolManager.cs
- TextEditorMouse.cs
- DataGridViewRowConverter.cs
- HttpClientProtocol.cs
- BinaryObjectInfo.cs
- TCEAdapterGenerator.cs
- Scripts.cs
- Propagator.JoinPropagator.cs
- DataGridRowClipboardEventArgs.cs
- FileAuthorizationModule.cs
- _NegotiateClient.cs
- Int32Storage.cs
- KeyboardEventArgs.cs
- ConfigXmlWhitespace.cs
- WebResourceUtil.cs
- PointHitTestResult.cs
- XmlSchemaSimpleContentExtension.cs
- GACMembershipCondition.cs
- AnnotationAuthorChangedEventArgs.cs
- StructuralCache.cs
- NumericUpDownAccelerationCollection.cs
- StructuredType.cs
- ScrollItemProviderWrapper.cs
- KerberosSecurityTokenParameters.cs
- ListBoxItem.cs
- Emitter.cs
- PenLineCapValidation.cs
- NumberSubstitution.cs
- SecurityTokenSpecification.cs
- EntityTypeEmitter.cs
- BufferBuilder.cs
- HotCommands.cs
- control.ime.cs
- AxHost.cs
- TraceContextEventArgs.cs
- ContentTextAutomationPeer.cs
- DispatcherHookEventArgs.cs
- HttpHeaderCollection.cs
- COSERVERINFO.cs
- OutputWindow.cs
- TextSerializer.cs
- ButtonBase.cs
- StrokeNode.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- Config.cs
- QilXmlReader.cs
- RenderData.cs
- BaseProcessProtocolHandler.cs
- UIElement.cs
- MessageQueueAccessControlEntry.cs
- DataGridViewIntLinkedList.cs
- WebBrowserUriTypeConverter.cs
- DataControlFieldCell.cs
- RadioButton.cs
- WebException.cs
- MailWriter.cs
- DuplexSecurityProtocolFactory.cs
- PermissionListSet.cs
- SemanticKeyElement.cs
- WizardStepBase.cs
- HeaderedItemsControl.cs
- DefaultHttpHandler.cs
- Latin1Encoding.cs
- Validator.cs
- OLEDB_Util.cs
- figurelength.cs
- TextFormatterContext.cs
- BitmapEffect.cs
- LinkTarget.cs
- ISFTagAndGuidCache.cs
- SizeValueSerializer.cs
- Renderer.cs
- DatePickerAutomationPeer.cs
- ReadOnlyAttribute.cs
- SizeAnimation.cs
- InfoCardTraceRecord.cs