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
- MethodMessage.cs
- DataGridViewSelectedColumnCollection.cs
- PreservationFileReader.cs
- PrePostDescendentsWalker.cs
- NoClickablePointException.cs
- TransformGroup.cs
- PrivateFontCollection.cs
- CellTreeNode.cs
- SortAction.cs
- RepeaterItemCollection.cs
- HijriCalendar.cs
- TypeValidationEventArgs.cs
- NavigationFailedEventArgs.cs
- TextEditorSpelling.cs
- PeerInvitationResponse.cs
- DataError.cs
- EndPoint.cs
- ReadWriteSpinLock.cs
- ScriptingAuthenticationServiceSection.cs
- XsltContext.cs
- EncryptedPackageFilter.cs
- HashHelpers.cs
- InfoCardRSACryptoProvider.cs
- DeobfuscatingStream.cs
- FigureParaClient.cs
- Int32CAMarshaler.cs
- Stylesheet.cs
- ResourcesChangeInfo.cs
- GroupBox.cs
- BufferedResponseStream.cs
- UserControlCodeDomTreeGenerator.cs
- ProfileService.cs
- DispatcherExceptionFilterEventArgs.cs
- UdpTransportSettings.cs
- DataPager.cs
- FrameworkContentElementAutomationPeer.cs
- GradientStopCollection.cs
- FacetDescription.cs
- HtmlTableRowCollection.cs
- HtmlPageAdapter.cs
- ConstraintManager.cs
- HttpCapabilitiesEvaluator.cs
- OleDbEnumerator.cs
- DeferredSelectedIndexReference.cs
- DiscoveryClientReferences.cs
- ReferenceTypeElement.cs
- ChangePassword.cs
- ImageInfo.cs
- ObjectAnimationUsingKeyFrames.cs
- SettingsBase.cs
- basevalidator.cs
- SessionParameter.cs
- Transaction.cs
- ToolStripDropDownButton.cs
- NetSectionGroup.cs
- ComponentGlyph.cs
- SmiXetterAccessMap.cs
- FastPropertyAccessor.cs
- HttpClientProtocol.cs
- FixedSOMPageElement.cs
- NamedElement.cs
- String.cs
- wmiprovider.cs
- SimpleWebHandlerParser.cs
- PrimitiveDataContract.cs
- StreamGeometryContext.cs
- RegexCharClass.cs
- InkSerializer.cs
- Events.cs
- FileDialogCustomPlacesCollection.cs
- RegexCode.cs
- ValidatedControlConverter.cs
- InlineCollection.cs
- TextUtf8RawTextWriter.cs
- EntityContainerEmitter.cs
- SmtpSpecifiedPickupDirectoryElement.cs
- TextEditorParagraphs.cs
- COM2ComponentEditor.cs
- ViewStateModeByIdAttribute.cs
- CaseStatementProjectedSlot.cs
- HTTPNotFoundHandler.cs
- ExpressionHelper.cs
- PrintPreviewControl.cs
- SizeAnimationUsingKeyFrames.cs
- EntityDataSourceWrapper.cs
- InfoCardTrace.cs
- QueryOperator.cs
- StateManagedCollection.cs
- CodeParameterDeclarationExpressionCollection.cs
- OuterGlowBitmapEffect.cs
- TraceContext.cs
- CFGGrammar.cs
- UserControlParser.cs
- SQLByte.cs
- ValueChangedEventManager.cs
- MouseActionConverter.cs
- XAMLParseException.cs
- X509Certificate2.cs
- util.cs
- DTCTransactionManager.cs