Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / fx / src / xsp / System / Web / UI / StringPropertyBuilder.cs / 1 / StringPropertyBuilder.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System; using System.Collections; ////// Builds inner string properties. /// internal sealed class StringPropertyBuilder : ControlBuilder { private string _text; ////// Creates a new instance of StringPropertyBuilder. /// internal StringPropertyBuilder() { } internal StringPropertyBuilder(string text) { _text = text; } ////// Returns the inner text of the property. /// public string Text { get { return (_text == null) ? String.Empty : _text; } } ////// Gets the inner text of the property. /// public override void AppendLiteralString(string s) { if (ParentBuilder != null && ParentBuilder.HtmlDecodeLiterals()) s = HttpUtility.HtmlDecode(s); _text = s; } ////// Throws an exception - string properties cannot contain other objects. /// public override void AppendSubBuilder(ControlBuilder subBuilder) { throw new HttpException(SR.GetString(SR.StringPropertyBuilder_CannotHaveChildObjects, TagName, (ParentBuilder != null ? ParentBuilder.TagName : String.Empty))); } public override object BuildObject() { return Text; } public override void Init(TemplateParser parser, ControlBuilder parentBuilder, Type type, string tagName, string ID, IDictionary attribs) { base.Init(parser, parentBuilder, type /*type*/, tagName, ID, attribs); SetControlType(typeof(string)); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System; using System.Collections; ////// Builds inner string properties. /// internal sealed class StringPropertyBuilder : ControlBuilder { private string _text; ////// Creates a new instance of StringPropertyBuilder. /// internal StringPropertyBuilder() { } internal StringPropertyBuilder(string text) { _text = text; } ////// Returns the inner text of the property. /// public string Text { get { return (_text == null) ? String.Empty : _text; } } ////// Gets the inner text of the property. /// public override void AppendLiteralString(string s) { if (ParentBuilder != null && ParentBuilder.HtmlDecodeLiterals()) s = HttpUtility.HtmlDecode(s); _text = s; } ////// Throws an exception - string properties cannot contain other objects. /// public override void AppendSubBuilder(ControlBuilder subBuilder) { throw new HttpException(SR.GetString(SR.StringPropertyBuilder_CannotHaveChildObjects, TagName, (ParentBuilder != null ? ParentBuilder.TagName : String.Empty))); } public override object BuildObject() { return Text; } public override void Init(TemplateParser parser, ControlBuilder parentBuilder, Type type, string tagName, string ID, IDictionary attribs) { base.Init(parser, parentBuilder, type /*type*/, tagName, ID, attribs); SetControlType(typeof(string)); } } } // 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
- HttpEncoderUtility.cs
- _RequestLifetimeSetter.cs
- DesignerRegion.cs
- IxmlLineInfo.cs
- XmlValidatingReader.cs
- ButtonColumn.cs
- SkipStoryboardToFill.cs
- XmlMtomReader.cs
- ButtonField.cs
- RawContentTypeMapper.cs
- StructuredCompositeActivityDesigner.cs
- BinaryConverter.cs
- ControllableStoryboardAction.cs
- TypeTypeConverter.cs
- LinqTreeNodeEvaluator.cs
- SmtpNtlmAuthenticationModule.cs
- TabletCollection.cs
- PartialArray.cs
- SQlBooleanStorage.cs
- WsdlWriter.cs
- IconHelper.cs
- ManagementOptions.cs
- CaseStatement.cs
- Sql8ExpressionRewriter.cs
- AssociatedControlConverter.cs
- Style.cs
- Catch.cs
- Registry.cs
- ClientTarget.cs
- User.cs
- CommandField.cs
- MemberCollection.cs
- ResetableIterator.cs
- HandlerFactoryWrapper.cs
- BamlCollectionHolder.cs
- ScrollableControl.cs
- DBCSCodePageEncoding.cs
- SystemException.cs
- ThemeInfoAttribute.cs
- HelloOperation11AsyncResult.cs
- GridItem.cs
- IssuedTokensHeader.cs
- HtmlInputText.cs
- SQLDecimalStorage.cs
- AnalyzedTree.cs
- MoveSizeWinEventHandler.cs
- XmlAutoDetectWriter.cs
- DependencyProperty.cs
- DefaultPrintController.cs
- Encoding.cs
- Facet.cs
- storepermissionattribute.cs
- GPPOINT.cs
- ToolStripGripRenderEventArgs.cs
- HtmlImageAdapter.cs
- BinaryMethodMessage.cs
- SqlDataSourceCustomCommandPanel.cs
- AbsoluteQuery.cs
- DoubleLinkList.cs
- SelectionItemPattern.cs
- DSACryptoServiceProvider.cs
- StorageAssociationTypeMapping.cs
- UpdateCommandGenerator.cs
- UserControlAutomationPeer.cs
- UserControlParser.cs
- StylusPointDescription.cs
- NonVisualControlAttribute.cs
- WCFBuildProvider.cs
- DecoderFallback.cs
- AspProxy.cs
- XamlSerializationHelper.cs
- DataRow.cs
- COM2IProvidePropertyBuilderHandler.cs
- Console.cs
- MetadataArtifactLoaderCompositeFile.cs
- TargetConverter.cs
- RC2.cs
- X509Certificate2Collection.cs
- TableCellCollection.cs
- RadialGradientBrush.cs
- MTConfigUtil.cs
- FacetChecker.cs
- OrderByQueryOptionExpression.cs
- ExternalDataExchangeService.cs
- MetaTableHelper.cs
- DataGridColumnFloatingHeader.cs
- FileStream.cs
- cookiecollection.cs
- SafeFileMapViewHandle.cs
- DataPagerFieldItem.cs
- Range.cs
- ParameterCollection.cs
- TransformedBitmap.cs
- RequestQueue.cs
- FlatButtonAppearance.cs
- TypeRefElement.cs
- RuntimeConfigLKG.cs
- Accessible.cs
- HttpListenerException.cs
- GroupAggregateExpr.cs