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
- ImageMap.cs
- ReaderWriterLockWrapper.cs
- versioninfo.cs
- InfoCardAsymmetricCrypto.cs
- DBAsyncResult.cs
- DoubleStorage.cs
- Vector3DKeyFrameCollection.cs
- X509UI.cs
- WebBrowserHelper.cs
- EnterpriseServicesHelper.cs
- WasEndpointConfigContainer.cs
- StringInfo.cs
- MultiAsyncResult.cs
- Options.cs
- assertwrapper.cs
- XmlDataSourceView.cs
- Point3DKeyFrameCollection.cs
- Rule.cs
- ProgressBarHighlightConverter.cs
- SparseMemoryStream.cs
- SafeReadContext.cs
- LocatorPart.cs
- XmlFormatExtensionPrefixAttribute.cs
- ProgressBarBrushConverter.cs
- ProcessingInstructionAction.cs
- DataStreams.cs
- XsdDataContractImporter.cs
- SerializationInfo.cs
- DigestTraceRecordHelper.cs
- SiteMap.cs
- OpenFileDialog.cs
- AssemblyHash.cs
- ToolBar.cs
- TerminateDesigner.cs
- ObjectNavigationPropertyMapping.cs
- SelectionEditingBehavior.cs
- CardSpacePolicyElement.cs
- EffectiveValueEntry.cs
- Int64KeyFrameCollection.cs
- XmlDataSourceNodeDescriptor.cs
- Query.cs
- DesignerMetadata.cs
- XmlName.cs
- StyleSheetDesigner.cs
- SizeF.cs
- LayoutTableCell.cs
- TypeGeneratedEventArgs.cs
- MultiByteCodec.cs
- MemberDescriptor.cs
- CopyAttributesAction.cs
- WorkflowServiceAttributesTypeConverter.cs
- HebrewCalendar.cs
- AssemblyUtil.cs
- SecurityHelper.cs
- MimeXmlReflector.cs
- DataGridViewCellValueEventArgs.cs
- AuthenticatingEventArgs.cs
- SourceFileBuildProvider.cs
- HttpModuleActionCollection.cs
- InputGestureCollection.cs
- RecommendedAsConfigurableAttribute.cs
- BulletedListDesigner.cs
- PermissionRequestEvidence.cs
- SoapAttributes.cs
- GroupBoxDesigner.cs
- SelectionProcessor.cs
- CustomAttributeFormatException.cs
- SqlConnectionHelper.cs
- Lasso.cs
- RemoteWebConfigurationHost.cs
- SQLGuidStorage.cs
- CollectionDataContractAttribute.cs
- FileDialog.cs
- _ProxyChain.cs
- XamlSerializationHelper.cs
- LogStore.cs
- StrongNameMembershipCondition.cs
- RepeatButton.cs
- DeviceContext2.cs
- SiteMapNodeItemEventArgs.cs
- DbConnectionStringBuilder.cs
- Line.cs
- OutputCacheSection.cs
- SoapInteropTypes.cs
- NumericUpDownAccelerationCollection.cs
- CopyNamespacesAction.cs
- Vector.cs
- BulletedListEventArgs.cs
- SeekableReadStream.cs
- SafeReversePInvokeHandle.cs
- WebPartMenu.cs
- InvalidateEvent.cs
- XmlSchemaExporter.cs
- AudienceUriMode.cs
- DecoderReplacementFallback.cs
- RSAPKCS1KeyExchangeDeformatter.cs
- ExtractorMetadata.cs
- TitleStyle.cs
- UnmanagedMemoryStream.cs
- SvcFileManager.cs