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
- StylusOverProperty.cs
- UserNamePasswordValidationMode.cs
- PresentationSource.cs
- OneToOneMappingSerializer.cs
- PropertyItem.cs
- InstanceNotFoundException.cs
- ResourcePart.cs
- PowerStatus.cs
- PageSettings.cs
- CommonGetThemePartSize.cs
- ButtonBaseAdapter.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- AttachedPropertyMethodSelector.cs
- SecurityResources.cs
- TempFiles.cs
- MenuEventArgs.cs
- AggregateNode.cs
- Int32RectValueSerializer.cs
- Exceptions.cs
- PointAnimationUsingKeyFrames.cs
- TransactionManager.cs
- RegexWriter.cs
- Graph.cs
- ScriptingProfileServiceSection.cs
- DomainConstraint.cs
- FileLevelControlBuilderAttribute.cs
- ACE.cs
- SimpleFileLog.cs
- CroppedBitmap.cs
- _KerberosClient.cs
- MobileControlsSectionHelper.cs
- VirtualizedCellInfoCollection.cs
- ObjectPersistData.cs
- SafeCryptHandles.cs
- DependencyPropertyConverter.cs
- IPCCacheManager.cs
- ObjectConverter.cs
- MenuStrip.cs
- Int32Storage.cs
- DynamicILGenerator.cs
- DateTimeConstantAttribute.cs
- Attributes.cs
- TextTreeFixupNode.cs
- CachedFontFace.cs
- ClientScriptManager.cs
- TreeNode.cs
- ScrollProviderWrapper.cs
- FtpWebResponse.cs
- CanonicalFormWriter.cs
- Transform3DCollection.cs
- AsyncPostBackTrigger.cs
- XmlSerializer.cs
- CustomWebEventKey.cs
- IssuedTokenServiceElement.cs
- ConfigurationPermission.cs
- Pair.cs
- HtmlControlPersistable.cs
- SingleKeyFrameCollection.cs
- RsaKeyGen.cs
- indexingfiltermarshaler.cs
- DataRowExtensions.cs
- DefaultValueMapping.cs
- TransformDescriptor.cs
- counter.cs
- CryptoKeySecurity.cs
- PasswordPropertyTextAttribute.cs
- QilXmlWriter.cs
- IPPacketInformation.cs
- SiteMapDataSourceView.cs
- XmlNodeChangedEventManager.cs
- PrimitiveXmlSerializers.cs
- GradientStop.cs
- BaseCodeDomTreeGenerator.cs
- SetStateDesigner.cs
- WebZone.cs
- FastEncoderWindow.cs
- DataGridViewComboBoxColumnDesigner.cs
- DecimalAnimation.cs
- TextMetrics.cs
- ObjectPropertyMapping.cs
- DragEventArgs.cs
- MemberProjectedSlot.cs
- StandardTransformFactory.cs
- XmlBinaryReader.cs
- DbMetaDataColumnNames.cs
- TrustManagerPromptUI.cs
- ErrorStyle.cs
- DrawListViewColumnHeaderEventArgs.cs
- CacheSection.cs
- XmlUrlResolver.cs
- XmlSchemaException.cs
- PageCatalogPartDesigner.cs
- _TimerThread.cs
- InternalBufferOverflowException.cs
- IntegerCollectionEditor.cs
- DataGridClipboardHelper.cs
- TypeDescriptorContext.cs
- StatusBarItemAutomationPeer.cs
- XmlTextWriter.cs
- OracleConnectionFactory.cs