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
- FontEmbeddingManager.cs
- CornerRadius.cs
- FullTextBreakpoint.cs
- NodeLabelEditEvent.cs
- EFAssociationProvider.cs
- SchemaSetCompiler.cs
- OdbcEnvironment.cs
- AssemblySettingAttributes.cs
- DocumentReference.cs
- FullTextState.cs
- AssertFilter.cs
- ListComponentEditorPage.cs
- PerfCounterSection.cs
- ProfileInfo.cs
- TagPrefixAttribute.cs
- GridViewCancelEditEventArgs.cs
- DesignerTransactionCloseEvent.cs
- URL.cs
- KeyProperty.cs
- PersonalizationStateInfoCollection.cs
- ConfigXmlElement.cs
- MsmqIntegrationInputChannel.cs
- CodeAttachEventStatement.cs
- brushes.cs
- AdRotator.cs
- SqlWorkflowInstanceStore.cs
- StylusEditingBehavior.cs
- AutomationPattern.cs
- CommandHelpers.cs
- ProxyAttribute.cs
- RuntimeArgumentHandle.cs
- TableSectionStyle.cs
- Cursor.cs
- CharacterString.cs
- XmlReader.cs
- FixedTextPointer.cs
- BitmapEffectState.cs
- XmlAnyElementAttribute.cs
- PublisherMembershipCondition.cs
- ModifierKeysConverter.cs
- StateValidator.cs
- QuestionEventArgs.cs
- ObjectDataSourceStatusEventArgs.cs
- StandardCommands.cs
- NullableConverter.cs
- CodeTypeReferenceCollection.cs
- COAUTHIDENTITY.cs
- SqlError.cs
- XPathNode.cs
- GroupByExpressionRewriter.cs
- NonParentingControl.cs
- IODescriptionAttribute.cs
- XmlHelper.cs
- SrgsDocument.cs
- MailMessage.cs
- ProcessInfo.cs
- BinaryObjectWriter.cs
- HandleCollector.cs
- ChangesetResponse.cs
- ConnectionManagementSection.cs
- WhitespaceSignificantCollectionAttribute.cs
- BindableAttribute.cs
- SspiNegotiationTokenAuthenticatorState.cs
- ProcessInputEventArgs.cs
- OracleBFile.cs
- MissingManifestResourceException.cs
- FileUtil.cs
- RegexBoyerMoore.cs
- DataGridViewCellStateChangedEventArgs.cs
- MouseGestureValueSerializer.cs
- FtpWebResponse.cs
- URLAttribute.cs
- DataBoundLiteralControl.cs
- LinearQuaternionKeyFrame.cs
- BypassElement.cs
- ConfigUtil.cs
- Perspective.cs
- XmlDataSourceView.cs
- Int32Storage.cs
- MetadataItem.cs
- WindowsHyperlink.cs
- HttpClientCertificate.cs
- IIS7WorkerRequest.cs
- XmlReaderSettings.cs
- WriteTimeStream.cs
- Compress.cs
- ContractHandle.cs
- SByteStorage.cs
- DynamicValidator.cs
- WmlPageAdapter.cs
- BitVector32.cs
- Transform3D.cs
- Trigger.cs
- XmlDownloadManager.cs
- loginstatus.cs
- XmlDigitalSignatureProcessor.cs
- BufferedGraphicsManager.cs
- XamlWrappingReader.cs
- CookieProtection.cs
- DataGridCellItemAutomationPeer.cs