Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / Configuration / ProfilePropertyNameValidator.cs / 1 / 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(); } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DbConnectionPoolGroup.cs
- ClientConfigurationHost.cs
- VectorAnimationUsingKeyFrames.cs
- CachedRequestParams.cs
- ImageSource.cs
- NaturalLanguageHyphenator.cs
- RequestQueue.cs
- DropDownList.cs
- TransformCollection.cs
- LogLogRecordHeader.cs
- DBDataPermissionAttribute.cs
- HatchBrush.cs
- ReceiveErrorHandling.cs
- ReadOnlyCollectionBase.cs
- ExtendedPropertyDescriptor.cs
- ImageDrawing.cs
- CollectionChangedEventManager.cs
- AutomationElement.cs
- TableCellCollection.cs
- XmlUnspecifiedAttribute.cs
- PostBackTrigger.cs
- CompilerState.cs
- TextDecorationCollectionConverter.cs
- XmlSchemaExternal.cs
- _BufferOffsetSize.cs
- FrameworkObject.cs
- EdmToObjectNamespaceMap.cs
- XsdDuration.cs
- DataGridViewControlCollection.cs
- CheckedListBox.cs
- OutOfMemoryException.cs
- SingleStorage.cs
- PolicyStatement.cs
- SecurityResources.cs
- HttpVersion.cs
- UInt32.cs
- EmptyStringExpandableObjectConverter.cs
- Command.cs
- Matrix.cs
- DetailsViewRow.cs
- WebReferenceCollection.cs
- DetailsView.cs
- RequestQueue.cs
- XmlCharacterData.cs
- StringArrayConverter.cs
- WorkflowWebService.cs
- HandlerBase.cs
- WorkflowValidationFailedException.cs
- UpdateProgress.cs
- ModelTreeManager.cs
- FontClient.cs
- FileDialogPermission.cs
- TrackBar.cs
- MessageFault.cs
- HttpConfigurationSystem.cs
- FixedDSBuilder.cs
- IOThreadScheduler.cs
- DynamicResourceExtensionConverter.cs
- _BaseOverlappedAsyncResult.cs
- ModuleElement.cs
- InvalidAsynchronousStateException.cs
- SqlHelper.cs
- ObjectRef.cs
- GlyphManager.cs
- HtmlButton.cs
- AttributeUsageAttribute.cs
- EncryptedKeyIdentifierClause.cs
- ExceptionAggregator.cs
- PersonalizationProviderHelper.cs
- RangeContentEnumerator.cs
- ExpressionBuilder.cs
- WebPartDisplayModeEventArgs.cs
- ArglessEventHandlerProxy.cs
- PrintEvent.cs
- peernodeimplementation.cs
- AutomationPatternInfo.cs
- DrawingBrush.cs
- QilCloneVisitor.cs
- LayoutTableCell.cs
- SdlChannelSink.cs
- TypeFieldSchema.cs
- TypeBrowserDialog.cs
- QuaternionKeyFrameCollection.cs
- DllNotFoundException.cs
- sqlnorm.cs
- PanelStyle.cs
- TreeNode.cs
- SynchronizingStream.cs
- Cursors.cs
- SocketAddress.cs
- FileChangesMonitor.cs
- URIFormatException.cs
- SingleKeyFrameCollection.cs
- SimpleNameService.cs
- JsonWriterDelegator.cs
- ToolStripArrowRenderEventArgs.cs
- TypeReference.cs
- ObjectDisposedException.cs
- NumericUpDown.cs
- ScriptingRoleServiceSection.cs