Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / Configuration / ProfilePropertyNameValidator.cs / 1305376 / ProfilePropertyNameValidator.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Configuration { using System; using System.Xml; using System.Configuration; using System.Collections.Specialized; using System.Collections; using System.IO; using System.Text; using System.Web.Util; internal sealed class ProfilePropertyNameValidator : ConfigurationValidatorBase { public override bool CanValidate(Type type) { return (type == typeof(string)); } public override void Validate(object value) { if (value == null) { throw new ArgumentNullException("value"); } string s = value as string; if (s != null) { s = s.Trim(); } if (string.IsNullOrEmpty(s)) { throw new ArgumentException(SR.GetString(SR.Profile_name_can_not_be_empty)); } if (s.Contains(".")) { throw new ArgumentException(SR.GetString(SR.Profile_name_can_not_contain_period)); } } internal static ProfilePropertyNameValidator SingletonInstance = new ProfilePropertyNameValidator(); } } // 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
- PropertySet.cs
- TogglePattern.cs
- UserUseLicenseDictionaryLoader.cs
- MemberAccessException.cs
- TypePropertyEditor.cs
- DesignerOptionService.cs
- CopyAction.cs
- MultipartContentParser.cs
- AssemblyEvidenceFactory.cs
- DSASignatureFormatter.cs
- Int32CollectionValueSerializer.cs
- XmlBinaryWriterSession.cs
- XmlConvert.cs
- AsyncCodeActivity.cs
- DispatcherExceptionEventArgs.cs
- AssemblyAssociatedContentFileAttribute.cs
- DbParameterHelper.cs
- SystemParameters.cs
- CharEntityEncoderFallback.cs
- DataGridGeneralPage.cs
- EasingKeyFrames.cs
- UseManagedPresentationBindingElementImporter.cs
- BoolLiteral.cs
- ClientType.cs
- ObjectToIdCache.cs
- MailAddress.cs
- ConfigurationLocationCollection.cs
- TextSearch.cs
- SessionEndingCancelEventArgs.cs
- SendMailErrorEventArgs.cs
- InternalTransaction.cs
- LayoutEngine.cs
- DataViewSetting.cs
- XPathMessageContext.cs
- BoundField.cs
- RectangleConverter.cs
- TitleStyle.cs
- CleanUpVirtualizedItemEventArgs.cs
- DataContext.cs
- XXXInfos.cs
- CodeCatchClause.cs
- BufferAllocator.cs
- WebBaseEventKeyComparer.cs
- AppSecurityManager.cs
- DataPointer.cs
- RadioButtonPopupAdapter.cs
- SqlDataAdapter.cs
- ExecutionContext.cs
- DataProtection.cs
- TypeForwardedToAttribute.cs
- ILGenerator.cs
- CodeCatchClauseCollection.cs
- ObfuscateAssemblyAttribute.cs
- BamlTreeMap.cs
- Geometry.cs
- _SslSessionsCache.cs
- DtrList.cs
- StreamingContext.cs
- MouseEvent.cs
- DbModificationClause.cs
- FileEnumerator.cs
- SeekStoryboard.cs
- COM2ComponentEditor.cs
- CurrencyWrapper.cs
- BaseDataList.cs
- RemotingConfiguration.cs
- PageAsyncTaskManager.cs
- ObjectDataSourceChooseTypePanel.cs
- ListViewUpdateEventArgs.cs
- DelegatingConfigHost.cs
- XmlBindingWorker.cs
- UnionExpr.cs
- MatchingStyle.cs
- FilteredDataSetHelper.cs
- CursorConverter.cs
- SessionIDManager.cs
- GridSplitterAutomationPeer.cs
- QuaternionConverter.cs
- SecurityRuntime.cs
- WCFServiceClientProxyGenerator.cs
- DateBoldEvent.cs
- StdValidatorsAndConverters.cs
- GridViewColumnHeaderAutomationPeer.cs
- TemplatedMailWebEventProvider.cs
- DecoderBestFitFallback.cs
- MediaElement.cs
- BitmapCodecInfoInternal.cs
- UnsafeNativeMethods.cs
- ServerIdentity.cs
- ExeConfigurationFileMap.cs
- StructuredTypeEmitter.cs
- __Filters.cs
- MimeReturn.cs
- CloseSequence.cs
- SQLRoleProvider.cs
- DropDownList.cs
- SslStreamSecurityBindingElement.cs
- DelegatedStream.cs
- ObjectAssociationEndMapping.cs
- latinshape.cs