Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- CachedPathData.cs
- ViewGenerator.cs
- WebCategoryAttribute.cs
- ZipIOCentralDirectoryFileHeader.cs
- EventManager.cs
- GeometryHitTestParameters.cs
- TextFormatter.cs
- _NtlmClient.cs
- InvokeMethod.cs
- Rotation3D.cs
- BufferedGraphicsManager.cs
- Parsers.cs
- xmlformatgeneratorstatics.cs
- DisableDpiAwarenessAttribute.cs
- DomNameTable.cs
- XsltCompileContext.cs
- TextTreeTextNode.cs
- BrowserTree.cs
- CounterSample.cs
- ConfigurationSection.cs
- NumericExpr.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- SqlWebEventProvider.cs
- DriveNotFoundException.cs
- ConnectionConsumerAttribute.cs
- CollectionChangedEventManager.cs
- HttpRuntimeSection.cs
- OpCodes.cs
- SecurityProtocolFactory.cs
- PeerUnsafeNativeMethods.cs
- UnhandledExceptionEventArgs.cs
- DateTimeOffset.cs
- SrgsElementFactoryCompiler.cs
- RefreshPropertiesAttribute.cs
- SqlConnectionStringBuilder.cs
- Figure.cs
- WindowsRegion.cs
- coordinatorscratchpad.cs
- ListMarkerSourceInfo.cs
- BinaryFormatter.cs
- DuplexChannel.cs
- XmlSchemaRedefine.cs
- WindowsScrollBarBits.cs
- XmlSchemaCompilationSettings.cs
- Visual.cs
- ButtonBaseAutomationPeer.cs
- BinaryMethodMessage.cs
- OrderedHashRepartitionStream.cs
- HttpResponse.cs
- SystemInformation.cs
- HostedHttpContext.cs
- TouchesCapturedWithinProperty.cs
- NumericUpDown.cs
- BaseTemplateParser.cs
- DataGridSortCommandEventArgs.cs
- ReadOnlyDataSource.cs
- MouseEvent.cs
- ControlCollection.cs
- DispatcherOperation.cs
- WebPartMinimizeVerb.cs
- FixedSOMImage.cs
- MaskedTextBoxTextEditorDropDown.cs
- OleDbParameterCollection.cs
- FixedSOMPageElement.cs
- HashLookup.cs
- SiteMapNodeCollection.cs
- RotateTransform.cs
- ArgumentOutOfRangeException.cs
- FormViewUpdateEventArgs.cs
- SpotLight.cs
- StreamReader.cs
- FixedBufferAttribute.cs
- AbstractDataSvcMapFileLoader.cs
- InitiatorSessionSymmetricMessageSecurityProtocol.cs
- TypeName.cs
- ImageButton.cs
- RoutedPropertyChangedEventArgs.cs
- ExtensionFile.cs
- sortedlist.cs
- FormViewUpdatedEventArgs.cs
- ResourcesChangeInfo.cs
- NotifyInputEventArgs.cs
- OleCmdHelper.cs
- Buffer.cs
- MaskedTextBoxTextEditor.cs
- MsmqAppDomainProtocolHandler.cs
- PlainXmlWriter.cs
- _emptywebproxy.cs
- MetadataArtifactLoaderFile.cs
- TriggerActionCollection.cs
- Image.cs
- Compilation.cs
- RowToParametersTransformer.cs
- IndexOutOfRangeException.cs
- MonikerUtility.cs
- DataContractSerializer.cs
- CompositeScriptReferenceEventArgs.cs
- XmlObjectSerializerReadContextComplex.cs
- ActivityCollectionMarkupSerializer.cs
- PageBreakRecord.cs