Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- SplashScreen.cs
- EditingScope.cs
- ComponentEditorForm.cs
- ColumnClickEvent.cs
- ErrorHandler.cs
- XPathScanner.cs
- WorkflowCommandExtensionItem.cs
- ConfigurationPermission.cs
- oledbconnectionstring.cs
- GridLength.cs
- PeerCustomResolverSettings.cs
- FontFamily.cs
- IPGlobalProperties.cs
- ConnectivityStatus.cs
- DeviceContext2.cs
- SQLMembershipProvider.cs
- WriterOutput.cs
- WpfWebRequestHelper.cs
- ServiceSecurityAuditElement.cs
- StateWorkerRequest.cs
- DeclaredTypeValidator.cs
- ColumnCollection.cs
- DataGridViewColumn.cs
- RegexInterpreter.cs
- BoolExpression.cs
- TextAutomationPeer.cs
- _TLSstream.cs
- ListViewSortEventArgs.cs
- TypeConverterAttribute.cs
- EditorPart.cs
- KeyValuePair.cs
- Panel.cs
- NumericExpr.cs
- Message.cs
- XmlText.cs
- URIFormatException.cs
- ToolStripDropDownMenu.cs
- ListItemConverter.cs
- PerformanceCounterPermissionEntryCollection.cs
- TableLayoutCellPaintEventArgs.cs
- LogicalCallContext.cs
- DataRelationPropertyDescriptor.cs
- EventItfInfo.cs
- WebPartDescriptionCollection.cs
- FilterEventArgs.cs
- CollectionViewGroupRoot.cs
- BlockCollection.cs
- MailHeaderInfo.cs
- PolicyException.cs
- CssTextWriter.cs
- NewItemsContextMenuStrip.cs
- tooltip.cs
- HttpWriter.cs
- LexicalChunk.cs
- HtmlFormAdapter.cs
- HttpModuleAction.cs
- BaseContextMenu.cs
- XmlValidatingReaderImpl.cs
- ButtonFlatAdapter.cs
- UserValidatedEventArgs.cs
- Stream.cs
- CustomAttributeFormatException.cs
- WebFaultClientMessageInspector.cs
- ReadOnlyDataSourceView.cs
- WebReference.cs
- ParameterElement.cs
- FilterQuery.cs
- ClientSettingsStore.cs
- Context.cs
- _ChunkParse.cs
- RenderData.cs
- ScriptReference.cs
- ActivityTypeCodeDomSerializer.cs
- ListViewDeletedEventArgs.cs
- VarInfo.cs
- SqlTrackingService.cs
- SqlCommandAsyncResult.cs
- GridItem.cs
- SurrogateDataContract.cs
- UriExt.cs
- SHA384.cs
- DiscoveryClientProtocol.cs
- RunInstallerAttribute.cs
- SerializableAttribute.cs
- CustomValidator.cs
- CompilerErrorCollection.cs
- EnterpriseServicesHelper.cs
- ETagAttribute.cs
- WindowsFont.cs
- TdsParserSessionPool.cs
- FrameworkPropertyMetadata.cs
- EntryPointNotFoundException.cs
- CardSpacePolicyElement.cs
- MultiSelectRootGridEntry.cs
- CustomWebEventKey.cs
- RequiredFieldValidator.cs
- DBDataPermission.cs
- SerializationStore.cs
- EdmRelationshipRoleAttribute.cs
- HttpApplicationStateWrapper.cs