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
- SymbolUsageManager.cs
- CreateParams.cs
- RtfControls.cs
- MarkupObject.cs
- SurrogateEncoder.cs
- basenumberconverter.cs
- CommonObjectSecurity.cs
- BamlBinaryReader.cs
- UDPClient.cs
- SafeArchiveContext.cs
- DataGridViewRowStateChangedEventArgs.cs
- FullTextState.cs
- BufferedGraphicsContext.cs
- Authorization.cs
- EntityContainerEntitySet.cs
- SamlSerializer.cs
- BaseUriHelper.cs
- OdbcErrorCollection.cs
- GridViewDeleteEventArgs.cs
- CodeAttributeDeclarationCollection.cs
- WorkflowElementDialog.cs
- UnsafePeerToPeerMethods.cs
- CharKeyFrameCollection.cs
- ServicePointManager.cs
- StreamUpgradeAcceptor.cs
- Workspace.cs
- CapabilitiesPattern.cs
- ImageField.cs
- TextParagraphView.cs
- ToolStripItemEventArgs.cs
- ToolStripContainer.cs
- ToolStripDropDownButton.cs
- XmlBaseWriter.cs
- AvTraceFormat.cs
- ScrollChangedEventArgs.cs
- SiteMapDataSource.cs
- Compiler.cs
- AsyncOperationContext.cs
- ServiceManagerHandle.cs
- GridErrorDlg.cs
- TemplateControlParser.cs
- ImageFormat.cs
- KeyMatchBuilder.cs
- CultureInfo.cs
- AuthenticationConfig.cs
- DiscardableAttribute.cs
- TimeIntervalCollection.cs
- URLMembershipCondition.cs
- JoinGraph.cs
- LinkConverter.cs
- ValueOfAction.cs
- QfeChecker.cs
- Color.cs
- InputMethodStateTypeInfo.cs
- AppModelKnownContentFactory.cs
- TypeToken.cs
- XmlSchemaAttributeGroup.cs
- DataPointer.cs
- BatchParser.cs
- ZoneIdentityPermission.cs
- CqlParserHelpers.cs
- ImageFormat.cs
- SchemaCollectionCompiler.cs
- PriorityChain.cs
- OleDbConnectionFactory.cs
- RSAOAEPKeyExchangeDeformatter.cs
- DataGridRelationshipRow.cs
- mda.cs
- UnauthorizedAccessException.cs
- ScrollChrome.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- PropertyConverter.cs
- OAVariantLib.cs
- HwndStylusInputProvider.cs
- InvokeMemberBinder.cs
- EntityClassGenerator.cs
- WebZone.cs
- EntryWrittenEventArgs.cs
- Animatable.cs
- FillErrorEventArgs.cs
- objectresult_tresulttype.cs
- EventProviderWriter.cs
- CompilerWrapper.cs
- EntityDataSourceViewSchema.cs
- CompilerTypeWithParams.cs
- FixedTextPointer.cs
- XamlTypeMapper.cs
- CodePrimitiveExpression.cs
- ConfigurationStrings.cs
- DataGridViewRowEventArgs.cs
- Pointer.cs
- DataGridViewRowCancelEventArgs.cs
- Int64.cs
- SqlInternalConnectionTds.cs
- ZipPackagePart.cs
- Exceptions.cs
- DataSet.cs
- FixedSOMTableCell.cs
- FileFormatException.cs
- ListViewAutomationPeer.cs