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
- TextEndOfLine.cs
- _AcceptOverlappedAsyncResult.cs
- PathSegment.cs
- MaskedTextBoxTextEditor.cs
- CfgRule.cs
- TypeLoadException.cs
- WebControlParameterProxy.cs
- AdapterUtil.cs
- PageHandlerFactory.cs
- XXXOnTypeBuilderInstantiation.cs
- DataColumnMappingCollection.cs
- LogWriteRestartAreaAsyncResult.cs
- WizardStepBase.cs
- DmlSqlGenerator.cs
- SynchronizedRandom.cs
- Rotation3D.cs
- TTSEvent.cs
- BufferedWebEventProvider.cs
- HebrewNumber.cs
- UserInitiatedNavigationPermission.cs
- Typography.cs
- XmlMessageFormatter.cs
- ValidatingCollection.cs
- StrokeIntersection.cs
- RelatedPropertyManager.cs
- HttpRawResponse.cs
- CompilerErrorCollection.cs
- WebPartManager.cs
- XslCompiledTransform.cs
- XsltCompileContext.cs
- PermissionToken.cs
- EtwTrackingBehaviorElement.cs
- EventLogPermissionAttribute.cs
- MSHTMLHostUtil.cs
- SimpleApplicationHost.cs
- AtomContentProperty.cs
- OdbcConnectionOpen.cs
- EtwTrace.cs
- PEFileEvidenceFactory.cs
- ComponentTray.cs
- PtsHelper.cs
- ArrangedElement.cs
- ErrorRuntimeConfig.cs
- Int16Storage.cs
- WorkflowInvoker.cs
- ProcessHostServerConfig.cs
- AuthenticationSection.cs
- PeerCollaborationPermission.cs
- LoginView.cs
- ToolStripItemClickedEventArgs.cs
- SigningDialog.cs
- BindingBase.cs
- SoapInteropTypes.cs
- SrgsSemanticInterpretationTag.cs
- FieldValue.cs
- MULTI_QI.cs
- ActivityDefaults.cs
- HttpApplicationFactory.cs
- MimeBasePart.cs
- StylusCollection.cs
- HtmlInputSubmit.cs
- ExpressionBuilderCollection.cs
- AttributeEmitter.cs
- CompModSwitches.cs
- SrgsDocumentParser.cs
- NotImplementedException.cs
- DiscoveryMessageSequenceGenerator.cs
- ReadonlyMessageFilter.cs
- unsafeIndexingFilterStream.cs
- CommonRemoteMemoryBlock.cs
- InheritanceAttribute.cs
- OrthographicCamera.cs
- ParameterRefs.cs
- VisualStyleInformation.cs
- KnownBoxes.cs
- DecoderFallback.cs
- NavigationCommands.cs
- ResetableIterator.cs
- AggregateNode.cs
- OutputCacheModule.cs
- SecurityKeyIdentifierClause.cs
- SafeArrayRankMismatchException.cs
- Comparer.cs
- RightsManagementEncryptedStream.cs
- TrackingProfileSerializer.cs
- EntityDataSourceWrapper.cs
- DataGridTextBox.cs
- InfoCardArgumentException.cs
- TraceHelpers.cs
- Fx.cs
- ConfigXmlAttribute.cs
- COM2ComponentEditor.cs
- EditorResources.cs
- ZipIOExtraFieldZip64Element.cs
- DataGridViewBindingCompleteEventArgs.cs
- SecurityKeyIdentifier.cs
- ExceptionUtil.cs
- RegexParser.cs
- UnsafeNativeMethods.cs
- ReadOnlyDictionary.cs