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
- BamlBinaryReader.cs
- SqlDependencyListener.cs
- Style.cs
- ComPlusContractBehavior.cs
- LOSFormatter.cs
- HttpModuleActionCollection.cs
- PrimitiveRenderer.cs
- Missing.cs
- XmlTextReaderImpl.cs
- WebConfigurationManager.cs
- XmlDictionaryWriter.cs
- AlternateViewCollection.cs
- BoolExpr.cs
- SystemGatewayIPAddressInformation.cs
- PerspectiveCamera.cs
- ItemType.cs
- HtmlCalendarAdapter.cs
- LazyInitializer.cs
- IisHelper.cs
- AsymmetricKeyExchangeFormatter.cs
- DirectionalLight.cs
- CultureTableRecord.cs
- TextProviderWrapper.cs
- ScrollItemPattern.cs
- Baml2006ReaderSettings.cs
- LayoutManager.cs
- PermissionSet.cs
- SamlAuthenticationClaimResource.cs
- OleDbCommand.cs
- TypeLoadException.cs
- DataGridTablesFactory.cs
- _NegotiateClient.cs
- EmptyElement.cs
- EventLogPermissionEntry.cs
- QueryOpeningEnumerator.cs
- FileReservationCollection.cs
- LeafCellTreeNode.cs
- OneWayChannelListener.cs
- PageVisual.cs
- HitTestFilterBehavior.cs
- BackStopAuthenticationModule.cs
- PersonalizationStateInfoCollection.cs
- GridViewAutomationPeer.cs
- ConstructorNeedsTagAttribute.cs
- QueryableDataSourceEditData.cs
- FieldBuilder.cs
- returneventsaver.cs
- DocumentPage.cs
- TemporaryBitmapFile.cs
- IndividualDeviceConfig.cs
- HMAC.cs
- StateMachineSubscriptionManager.cs
- ItemContainerPattern.cs
- InfoCardRSAOAEPKeyExchangeFormatter.cs
- CultureInfoConverter.cs
- EventLogHandle.cs
- Splitter.cs
- EncoderExceptionFallback.cs
- UpdateTracker.cs
- FontNamesConverter.cs
- Attachment.cs
- ProjectedSlot.cs
- StylusPointPropertyUnit.cs
- AccessText.cs
- TypeLibConverter.cs
- MailWriter.cs
- ExpressionServices.cs
- GroupJoinQueryOperator.cs
- Menu.cs
- OdbcConnectionFactory.cs
- WebPartChrome.cs
- TypeRefElement.cs
- DisplayNameAttribute.cs
- Compiler.cs
- WebBaseEventKeyComparer.cs
- MILUtilities.cs
- MonthChangedEventArgs.cs
- TwoPhaseCommitProxy.cs
- PathSegment.cs
- ColorKeyFrameCollection.cs
- DropShadowBitmapEffect.cs
- RegexReplacement.cs
- _OverlappedAsyncResult.cs
- ToolStripLocationCancelEventArgs.cs
- Baml2006KnownTypes.cs
- ToolBarOverflowPanel.cs
- PeerNameResolver.cs
- ReadWriteObjectLock.cs
- DataGridViewSelectedCellCollection.cs
- WebGetAttribute.cs
- MetadataArtifactLoaderResource.cs
- TypeLoadException.cs
- ListItemCollection.cs
- HTMLTextWriter.cs
- TypeGeneratedEventArgs.cs
- FactoryGenerator.cs
- _DynamicWinsockMethods.cs
- HtmlInputRadioButton.cs
- JsonClassDataContract.cs
- ConsoleEntryPoint.cs