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
- StreamingContext.cs
- Setter.cs
- ReversePositionQuery.cs
- ImageSourceValueSerializer.cs
- DecoderReplacementFallback.cs
- DiscreteKeyFrames.cs
- QuaternionAnimationUsingKeyFrames.cs
- DiscoveryExceptionDictionary.cs
- Package.cs
- Semaphore.cs
- GC.cs
- TextEditorTables.cs
- RequestCachingSection.cs
- WebSysDefaultValueAttribute.cs
- ExpressionBindings.cs
- BasicExpandProvider.cs
- XmlCDATASection.cs
- QilStrConcat.cs
- LinqDataSourceValidationException.cs
- UnsafeNativeMethodsMilCoreApi.cs
- SortDescription.cs
- Literal.cs
- NativeMethods.cs
- DisplayNameAttribute.cs
- CodeExpressionStatement.cs
- Label.cs
- EncoderParameters.cs
- DefaultPropertyAttribute.cs
- OrderingExpression.cs
- TextServicesCompartment.cs
- SqlRetyper.cs
- Queue.cs
- XmlILConstructAnalyzer.cs
- ContentIterators.cs
- RegexGroupCollection.cs
- AmbientEnvironment.cs
- CopyOnWriteList.cs
- CanonicalFontFamilyReference.cs
- RenderData.cs
- ResourcePermissionBaseEntry.cs
- XmlUrlResolver.cs
- HwndSourceKeyboardInputSite.cs
- RSAOAEPKeyExchangeFormatter.cs
- Atom10ItemFormatter.cs
- WindowsFormsDesignerOptionService.cs
- XmlObjectSerializerWriteContextComplex.cs
- ConfigurationStrings.cs
- ToolStripArrowRenderEventArgs.cs
- ExpressionCopier.cs
- StringPropertyBuilder.cs
- TemplateControlBuildProvider.cs
- ParameterCollectionEditorForm.cs
- WindowsListViewGroupHelper.cs
- Part.cs
- XmlSerializationWriter.cs
- StringPropertyBuilder.cs
- WebServiceClientProxyGenerator.cs
- RijndaelManagedTransform.cs
- SqlGenericUtil.cs
- GlobalizationAssembly.cs
- DeviceSpecificDesigner.cs
- StylusPlugin.cs
- Pair.cs
- ObjectStateFormatter.cs
- SharedHttpTransportManager.cs
- RadioButtonPopupAdapter.cs
- OuterGlowBitmapEffect.cs
- Directory.cs
- PathFigure.cs
- AutoFocusStyle.xaml.cs
- JoinCqlBlock.cs
- IdnMapping.cs
- BitmapEffectInputConnector.cs
- TreeViewAutomationPeer.cs
- SamlAuthorizationDecisionStatement.cs
- HtmlLink.cs
- ResourceManager.cs
- RadioButtonDesigner.cs
- HtmlControl.cs
- ACL.cs
- QueryResponse.cs
- AuthorizationRule.cs
- PropertyTab.cs
- FtpRequestCacheValidator.cs
- HijriCalendar.cs
- Image.cs
- DrawingCollection.cs
- OutKeywords.cs
- OAVariantLib.cs
- WorkflowNamespace.cs
- SparseMemoryStream.cs
- QilReplaceVisitor.cs
- FileSystemEnumerable.cs
- BooleanProjectedSlot.cs
- PeekCompletedEventArgs.cs
- CustomAttribute.cs
- GPRECTF.cs
- SafeTimerHandle.cs
- CustomError.cs
- Scalars.cs