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
- SessionStateModule.cs
- ObjectStateEntry.cs
- Point4D.cs
- BulletedList.cs
- TableDetailsCollection.cs
- HttpPostedFile.cs
- RuleInfoComparer.cs
- EmptyStringExpandableObjectConverter.cs
- Events.cs
- Debugger.cs
- SchemaRegistration.cs
- CodeDOMUtility.cs
- DockPattern.cs
- Visual3D.cs
- Compensate.cs
- HitTestParameters3D.cs
- EnglishPluralizationService.cs
- TimeSpanOrInfiniteConverter.cs
- FigureHelper.cs
- HttpConfigurationSystem.cs
- CompiledIdentityConstraint.cs
- TableAdapterManagerHelper.cs
- PrintDocument.cs
- MultiSelectRootGridEntry.cs
- RegionData.cs
- AppLevelCompilationSectionCache.cs
- TriggerActionCollection.cs
- CorePropertiesFilter.cs
- ChildDocumentBlock.cs
- ControllableStoryboardAction.cs
- MembershipAdapter.cs
- BeginCreateSecurityTokenRequest.cs
- EdmPropertyAttribute.cs
- WebPartsSection.cs
- XmlObjectSerializerContext.cs
- TemplateContainer.cs
- HtmlInputPassword.cs
- ActivatedMessageQueue.cs
- SystemResourceKey.cs
- BitmapEffectDrawingContextState.cs
- CodeConditionStatement.cs
- BamlStream.cs
- DataGridPreparingCellForEditEventArgs.cs
- tibetanshape.cs
- Rectangle.cs
- SQLMembershipProvider.cs
- CommandEventArgs.cs
- EventLogPermission.cs
- UserMapPath.cs
- RotateTransform3D.cs
- BuildProvidersCompiler.cs
- WindowsGraphicsWrapper.cs
- WebPartsPersonalization.cs
- UpdateCommandGenerator.cs
- MembershipSection.cs
- SequenceDesigner.cs
- AuthenticationService.cs
- OpCopier.cs
- Point3DAnimation.cs
- SmiRecordBuffer.cs
- CodeVariableReferenceExpression.cs
- MultiTrigger.cs
- XmlSerializer.cs
- ImageListStreamer.cs
- XmlTextEncoder.cs
- FormCollection.cs
- While.cs
- WorkflowWebService.cs
- XmlRawWriterWrapper.cs
- ContextMenuAutomationPeer.cs
- configsystem.cs
- ContractListAdapter.cs
- ListViewGroup.cs
- QilList.cs
- PublishLicense.cs
- CompositeFontParser.cs
- ConfigurationManagerInternalFactory.cs
- HwndPanningFeedback.cs
- EncryptedType.cs
- HoistedLocals.cs
- EnvelopedPkcs7.cs
- ReverseComparer.cs
- XmlRawWriter.cs
- DataSetUtil.cs
- InteropTrackingRecord.cs
- QilPatternVisitor.cs
- MethodBody.cs
- SystemResourceHost.cs
- DefaultValueConverter.cs
- BitmapEffectInput.cs
- EventProxy.cs
- SharedDp.cs
- RelatedImageListAttribute.cs
- MultiPageTextView.cs
- PermissionAttributes.cs
- SR.cs
- BinaryUtilClasses.cs
- EditorOptionAttribute.cs
- storepermissionattribute.cs
- CodeDefaultValueExpression.cs