Code:
/ FX-1434 / FX-1434 / 1.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
- BitArray.cs
- Pkcs7Recipient.cs
- Random.cs
- StandardMenuStripVerb.cs
- IsolatedStorage.cs
- SoapExtensionReflector.cs
- ProgressBarAutomationPeer.cs
- MemberExpression.cs
- PropertyTabChangedEvent.cs
- NewExpression.cs
- ResourceType.cs
- Encoder.cs
- BuildProviderUtils.cs
- HttpGetClientProtocol.cs
- BridgeDataReader.cs
- PropertyOrder.cs
- DynamicScriptObject.cs
- CryptographicAttribute.cs
- TemplateParser.cs
- XpsFixedDocumentReaderWriter.cs
- InitiatorServiceModelSecurityTokenRequirement.cs
- WindowsListViewGroup.cs
- PartitionedDataSource.cs
- WinEventTracker.cs
- util.cs
- PersianCalendar.cs
- TextParaLineResult.cs
- HttpBufferlessInputStream.cs
- BindingGroup.cs
- XmlNamespaceMappingCollection.cs
- RawStylusInputReport.cs
- RelationHandler.cs
- ToolStripContextMenu.cs
- TextTreePropertyUndoUnit.cs
- PageStatePersister.cs
- DataGridViewColumnHeaderCell.cs
- TextAdaptor.cs
- DataControlFieldCollection.cs
- DialogResultConverter.cs
- pingexception.cs
- MinimizableAttributeTypeConverter.cs
- TypeAccessException.cs
- XmlTextEncoder.cs
- DataControlFieldCollection.cs
- DocumentApplicationJournalEntry.cs
- HtmlShimManager.cs
- GB18030Encoding.cs
- TextServicesManager.cs
- ListItemConverter.cs
- ProcessInfo.cs
- TitleStyle.cs
- formatter.cs
- COM2IVsPerPropertyBrowsingHandler.cs
- Calendar.cs
- ElementProxy.cs
- PriorityBinding.cs
- FormsAuthenticationUserCollection.cs
- DataGridViewUtilities.cs
- ChangesetResponse.cs
- ResourcePart.cs
- AnonymousIdentificationModule.cs
- EncodingNLS.cs
- SqlClientPermission.cs
- CommandConverter.cs
- NumberFormatter.cs
- CustomAttributeBuilder.cs
- VisualStyleRenderer.cs
- DataGridViewComponentPropertyGridSite.cs
- TemplatePartAttribute.cs
- EmptyEnumerator.cs
- TextCollapsingProperties.cs
- BamlStream.cs
- HandleRef.cs
- TypeUsage.cs
- CryptoProvider.cs
- SmtpNtlmAuthenticationModule.cs
- PreProcessInputEventArgs.cs
- XmlAttributeProperties.cs
- ping.cs
- TemplateComponentConnector.cs
- NCryptSafeHandles.cs
- PrintDocument.cs
- IPGlobalProperties.cs
- GraphicsContext.cs
- ButtonColumn.cs
- RuntimeIdentifierPropertyAttribute.cs
- MembershipSection.cs
- Lock.cs
- DataGridViewAccessibleObject.cs
- ViewBase.cs
- CopyNamespacesAction.cs
- StringHelper.cs
- ScriptReferenceEventArgs.cs
- Soap.cs
- Vector3DCollection.cs
- CaseInsensitiveComparer.cs
- SplineQuaternionKeyFrame.cs
- ItemMap.cs
- AVElementHelper.cs
- XmlSchemaDocumentation.cs