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
- DoubleAnimationBase.cs
- M3DUtil.cs
- ObjectTag.cs
- SimpleTypeResolver.cs
- DataGridLinkButton.cs
- SerializationException.cs
- indexingfiltermarshaler.cs
- HttpApplicationFactory.cs
- BitmapSource.cs
- LookupNode.cs
- ResourceContainer.cs
- RtfToXamlReader.cs
- SolidColorBrush.cs
- EventMap.cs
- XmlNodeChangedEventManager.cs
- ConstraintEnumerator.cs
- LogRecordSequence.cs
- FixedElement.cs
- mactripleDES.cs
- SQLResource.cs
- IProducerConsumerCollection.cs
- Point3DAnimation.cs
- _DomainName.cs
- EntityDataSourceReferenceGroup.cs
- ListBoxItemWrapperAutomationPeer.cs
- ObjectCache.cs
- DataObjectFieldAttribute.cs
- RegexParser.cs
- LogLogRecord.cs
- Transactions.cs
- ReaderContextStackData.cs
- Instrumentation.cs
- ComponentDispatcher.cs
- Command.cs
- StateBag.cs
- SqlDataSourceStatusEventArgs.cs
- Win32.cs
- Figure.cs
- WorkflowRuntimeBehavior.cs
- NameTable.cs
- RegexFCD.cs
- CodeTypeParameterCollection.cs
- EventPrivateKey.cs
- StateBag.cs
- DispatcherEventArgs.cs
- RegexGroup.cs
- Run.cs
- AddInStore.cs
- TCPListener.cs
- SelectionEditingBehavior.cs
- Marshal.cs
- ReflectionHelper.cs
- KeyValuePairs.cs
- SerialErrors.cs
- GlobalizationSection.cs
- ValidationError.cs
- XmlArrayAttribute.cs
- SynchronizationScope.cs
- CommandLineParser.cs
- SQLBytesStorage.cs
- NewArrayExpression.cs
- SmiEventSink_Default.cs
- LineInfo.cs
- ComPlusInstanceProvider.cs
- AddDataControlFieldDialog.cs
- ReferencedType.cs
- PropertyManager.cs
- EdmError.cs
- ObjectMaterializedEventArgs.cs
- CapabilitiesPattern.cs
- OracleException.cs
- InProcStateClientManager.cs
- ApplicationInfo.cs
- PersonalizablePropertyEntry.cs
- CreateUserErrorEventArgs.cs
- PageTheme.cs
- CommandHelpers.cs
- MenuStrip.cs
- PropertyDescriptors.cs
- SoundPlayerAction.cs
- IsolatedStorageFile.cs
- StreamInfo.cs
- AutoResizedEvent.cs
- ScriptingWebServicesSectionGroup.cs
- MenuCommand.cs
- SurrogateSelector.cs
- MobileFormsAuthentication.cs
- InputElement.cs
- SourceLineInfo.cs
- TaskCanceledException.cs
- FieldTemplateUserControl.cs
- HttpChannelListener.cs
- VirtualPath.cs
- Panel.cs
- Transform.cs
- GPRECTF.cs
- IPGlobalProperties.cs
- DesignTimeParseData.cs
- WorkflowTerminatedException.cs
- AsynchronousChannelMergeEnumerator.cs