Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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(); } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// 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
- PersistenceException.cs
- TypeBinaryExpression.cs
- OperationPickerDialog.cs
- shaperfactoryquerycachekey.cs
- XmlNamespaceManager.cs
- OptimalBreakSession.cs
- EntityDescriptor.cs
- SmiContext.cs
- BamlRecordReader.cs
- ContainerSelectorBehavior.cs
- SlipBehavior.cs
- DataControlExtensions.cs
- Soap.cs
- PeerName.cs
- TypedColumnHandler.cs
- IntegrationExceptionEventArgs.cs
- BaseCAMarshaler.cs
- FaultDescription.cs
- MapPathBasedVirtualPathProvider.cs
- WindowsTreeView.cs
- InternalSafeNativeMethods.cs
- SQLBinaryStorage.cs
- EventLogInternal.cs
- WebServiceTypeData.cs
- BoundsDrawingContextWalker.cs
- TraceListener.cs
- LinqDataSourceUpdateEventArgs.cs
- DecoderBestFitFallback.cs
- ListBindingHelper.cs
- IncomingWebResponseContext.cs
- ZipIOZip64EndOfCentralDirectoryLocatorBlock.cs
- TreeViewItem.cs
- FunctionNode.cs
- NumberAction.cs
- PriorityItem.cs
- ForAllOperator.cs
- IsolatedStorageFileStream.cs
- ConstraintEnumerator.cs
- RootBrowserWindow.cs
- NetSectionGroup.cs
- TreeView.cs
- DataContractJsonSerializerOperationBehavior.cs
- MultiAsyncResult.cs
- MarkerProperties.cs
- WebBrowserPermission.cs
- DurableOperationAttribute.cs
- RectangleF.cs
- counter.cs
- ForceCopyBuildProvider.cs
- SqlDuplicator.cs
- WebScriptMetadataInstanceContextProvider.cs
- UIAgentAsyncBeginRequest.cs
- ListenerAdapterBase.cs
- ThicknessAnimation.cs
- PeerNearMe.cs
- RelationshipManager.cs
- DataSourceXmlTextReader.cs
- SortedList.cs
- WebConfigurationHost.cs
- XmlDataLoader.cs
- DuplexClientBase.cs
- EditorPartCollection.cs
- TextBoxDesigner.cs
- TextRangeEdit.cs
- OdbcCommandBuilder.cs
- KeyboardNavigation.cs
- DateTimeOffset.cs
- SafeThemeHandle.cs
- ServerValidateEventArgs.cs
- UpdatePanelTrigger.cs
- ManagedIStream.cs
- DrawingVisualDrawingContext.cs
- QuaternionRotation3D.cs
- EditorPart.cs
- LineBreak.cs
- InterleavedZipPartStream.cs
- RawMouseInputReport.cs
- SmtpTransport.cs
- DrawingCollection.cs
- SiteMapHierarchicalDataSourceView.cs
- SwitchLevelAttribute.cs
- ContentType.cs
- BooleanStorage.cs
- SHA256CryptoServiceProvider.cs
- JsonMessageEncoderFactory.cs
- SessionParameter.cs
- ScriptingJsonSerializationSection.cs
- SizeAnimationClockResource.cs
- StorageMappingFragment.cs
- Roles.cs
- ActiveXSite.cs
- LicenseException.cs
- AvTrace.cs
- LocalizedNameDescriptionPair.cs
- FontFamily.cs
- securestring.cs
- CaseInsensitiveOrdinalStringComparer.cs
- ActivityExecutorDelegateInfo.cs
- Intellisense.cs
- ConnectionStringsExpressionBuilder.cs