Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- DataGridViewRowHeaderCell.cs
- ProxyElement.cs
- SchemaImporter.cs
- Validator.cs
- SeekableReadStream.cs
- DateTimeUtil.cs
- columnmapfactory.cs
- ArgumentDesigner.xaml.cs
- Utility.cs
- DataSpaceManager.cs
- TextFormatterContext.cs
- DataGridViewComboBoxColumn.cs
- MergeFailedEvent.cs
- GridErrorDlg.cs
- MethodImplAttribute.cs
- HttpServerVarsCollection.cs
- UpDownBase.cs
- Speller.cs
- BaseUriHelper.cs
- XmlSerializerNamespaces.cs
- ReferenceService.cs
- NetNamedPipeSecurityElement.cs
- MultipartContentParser.cs
- TTSEvent.cs
- ChtmlMobileTextWriter.cs
- XmlDigitalSignatureProcessor.cs
- UnhandledExceptionEventArgs.cs
- FormClosingEvent.cs
- GetLedgerRequest.cs
- SafeNativeMethodsOther.cs
- PerformanceCounterPermissionEntry.cs
- RuleProcessor.cs
- SerialStream.cs
- ThemeConfigurationDialog.cs
- DesignBindingConverter.cs
- XmlProcessingInstruction.cs
- ClientRuntimeConfig.cs
- externdll.cs
- Size3DValueSerializer.cs
- OSFeature.cs
- GetWinFXPath.cs
- NullReferenceException.cs
- WsatServiceCertificate.cs
- BadImageFormatException.cs
- ErrorHandler.cs
- DataSourceDesigner.cs
- EntitySqlQueryCacheKey.cs
- DisplayNameAttribute.cs
- SystemIPGlobalProperties.cs
- ServiceProviders.cs
- MLangCodePageEncoding.cs
- FixedPageStructure.cs
- WSTrustDec2005.cs
- TcpClientSocketManager.cs
- ServiceModelConfigurationSectionCollection.cs
- DbgUtil.cs
- FrameworkTextComposition.cs
- RuleAttributes.cs
- InputMethod.cs
- BrowserTree.cs
- Automation.cs
- MaskInputRejectedEventArgs.cs
- Activity.cs
- MessagePropertyVariants.cs
- InputBindingCollection.cs
- TextParagraphView.cs
- X509CertificateClaimSet.cs
- CollectionChange.cs
- TraceHwndHost.cs
- HierarchicalDataSourceDesigner.cs
- PerformanceCounterManager.cs
- ToolStripItemDesigner.cs
- HttpChannelFactory.cs
- SizeKeyFrameCollection.cs
- OdbcStatementHandle.cs
- Expander.cs
- MULTI_QI.cs
- File.cs
- Int16Storage.cs
- DataPager.cs
- TraceHelpers.cs
- ContentFilePart.cs
- _HelperAsyncResults.cs
- PointCollection.cs
- SelectionItemPattern.cs
- Parameter.cs
- AnnotationObservableCollection.cs
- TranslateTransform3D.cs
- PeerTransportListenAddressValidator.cs
- ButtonChrome.cs
- ProcessStartInfo.cs
- ProcessMessagesAsyncResult.cs
- ResolveMatchesCD1.cs
- GridLengthConverter.cs
- ThicknessAnimationBase.cs
- TextElementCollectionHelper.cs
- CapacityStreamGeometryContext.cs
- KeyMatchBuilder.cs
- UInt32Converter.cs
- StaticContext.cs