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
- HttpListenerPrefixCollection.cs
- PageFunction.cs
- ProfileParameter.cs
- InfoCardArgumentException.cs
- MsmqChannelFactoryBase.cs
- StructuredTypeEmitter.cs
- PermissionSetTriple.cs
- ConfigurationElement.cs
- PageAdapter.cs
- ApplicationDirectoryMembershipCondition.cs
- ParallelTimeline.cs
- AsyncWaitHandle.cs
- MetadataImporter.cs
- HwndAppCommandInputProvider.cs
- TreeViewHitTestInfo.cs
- SimpleWebHandlerParser.cs
- BasicDesignerLoader.cs
- _HTTPDateParse.cs
- SendMessageContent.cs
- WorkflowQueuingService.cs
- HTMLTagNameToTypeMapper.cs
- DataViewSettingCollection.cs
- DataReceivedEventArgs.cs
- BinaryNode.cs
- SystemIPv6InterfaceProperties.cs
- ReversePositionQuery.cs
- Style.cs
- odbcmetadatafactory.cs
- DataGridViewColumnConverter.cs
- VirtualPathUtility.cs
- NavigationProperty.cs
- ResourceDescriptionAttribute.cs
- PathFigureCollection.cs
- HelpPage.cs
- XPathSingletonIterator.cs
- BufferedStream.cs
- InertiaRotationBehavior.cs
- EnterpriseServicesHelper.cs
- AnnotationDocumentPaginator.cs
- DbXmlEnabledProviderManifest.cs
- ControlIdConverter.cs
- IgnoreSectionHandler.cs
- ToolStripDropDown.cs
- ThreadAbortException.cs
- EditorPart.cs
- XmlReflectionMember.cs
- CaretElement.cs
- StoragePropertyMapping.cs
- WebPartManagerInternals.cs
- ICollection.cs
- safelink.cs
- HostingEnvironmentException.cs
- CompiledRegexRunnerFactory.cs
- PointF.cs
- WindowsListViewGroupSubsetLink.cs
- RootProfilePropertySettingsCollection.cs
- ConversionHelper.cs
- SortFieldComparer.cs
- GridViewSortEventArgs.cs
- Gdiplus.cs
- DefaultIfEmptyQueryOperator.cs
- GetPageCompletedEventArgs.cs
- ConfigurationConverterBase.cs
- SpoolingTaskBase.cs
- ConfigXmlSignificantWhitespace.cs
- SharedPerformanceCounter.cs
- COAUTHIDENTITY.cs
- PageTheme.cs
- CutCopyPasteHelper.cs
- ObjectDataSourceMethodEventArgs.cs
- XLinq.cs
- XamlBuildProvider.cs
- XamlTypeMapperSchemaContext.cs
- UInt16Storage.cs
- CleanUpVirtualizedItemEventArgs.cs
- ComplexLine.cs
- FontFamilyIdentifier.cs
- InputGestureCollection.cs
- WebServicesSection.cs
- AppSettings.cs
- SystemColorTracker.cs
- EllipticalNodeOperations.cs
- ByteKeyFrameCollection.cs
- SqlSupersetValidator.cs
- RectKeyFrameCollection.cs
- CachedBitmap.cs
- MimeMapping.cs
- GrabHandleGlyph.cs
- BuilderPropertyEntry.cs
- ProfileService.cs
- Converter.cs
- ToolStripSettings.cs
- OutputCacheSettings.cs
- DispatcherExceptionEventArgs.cs
- GCHandleCookieTable.cs
- EventWaitHandle.cs
- SecurityChannelFactory.cs
- StateDesignerConnector.cs
- TriState.cs
- DesignerHost.cs