Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / PersistenceTypeAttribute.cs / 1305376 / PersistenceTypeAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System.Runtime.InteropServices; using System; using System.ComponentModel; ////// LiteralContentAttribute indicates whether the contents within a tag representing /// a custom/web control should be treated by Trident as a "literal/text" content. /// Web controls supporting complex properties (like Templates, etc.) typically /// mark themselves as "literals", thereby letting the designer infra-structure /// and Trident deal with the persistence of those attributes. /// /// If LiteralContentAttribute.No is present or no LiteralContentAttribute marking /// exists, then the tag corresponding to the web control is not treated as a literal /// content tag. /// If LiteralContentAttribute.Yes is present, then the tag corresponding to the web /// control is treated as a literal content tag. /// [AttributeUsage(AttributeTargets.All)] public sealed class PersistenceModeAttribute : Attribute { ////// This marks a property or event as persistable in the HTML tag as an attribute. /// public static readonly PersistenceModeAttribute Attribute = new PersistenceModeAttribute(PersistenceMode.Attribute); ////// This marks a property or event as persistable within the HTML tag as a nested tag. /// public static readonly PersistenceModeAttribute InnerProperty = new PersistenceModeAttribute(PersistenceMode.InnerProperty); ////// This marks a property or event as persistable within the HTML tag as a child. /// public static readonly PersistenceModeAttribute InnerDefaultProperty = new PersistenceModeAttribute(PersistenceMode.InnerDefaultProperty); ////// This marks a property or event as persistable within the HTML tag as a child. /// public static readonly PersistenceModeAttribute EncodedInnerDefaultProperty = new PersistenceModeAttribute(PersistenceMode.EncodedInnerDefaultProperty); ////// public static readonly PersistenceModeAttribute Default = Attribute; private PersistenceMode mode = PersistenceMode.Attribute; ///public PersistenceModeAttribute(PersistenceMode mode) { if (mode < PersistenceMode.Attribute || mode > PersistenceMode.EncodedInnerDefaultProperty) { throw new ArgumentOutOfRangeException("mode"); } this.mode = mode; } /// /// public PersistenceMode Mode { get { return mode; } } ///public override int GetHashCode() { return Mode.GetHashCode(); } /// /// ///public override bool Equals(object obj) { if (obj == this) { return true; } if ((obj != null) && (obj is PersistenceModeAttribute)) { return((PersistenceModeAttribute)obj).Mode == mode; } return false; } /// /// ///public override bool IsDefaultAttribute() { return this.Equals(Default); } } } // 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
- TimeSpan.cs
- DrawingVisualDrawingContext.cs
- NotFiniteNumberException.cs
- ControlPaint.cs
- DigitShape.cs
- FacetValueContainer.cs
- FontConverter.cs
- util.cs
- Type.cs
- WebMessageEncodingElement.cs
- ParserHooks.cs
- XDeferredAxisSource.cs
- QueryableDataSourceView.cs
- cookiecollection.cs
- SystemParameters.cs
- UniqueIdentifierService.cs
- JsonWriter.cs
- EventData.cs
- NumberFunctions.cs
- HwndAppCommandInputProvider.cs
- SymmetricCryptoHandle.cs
- Polyline.cs
- CapabilitiesUse.cs
- RSAPKCS1SignatureDeformatter.cs
- XmlWrappingReader.cs
- ListSortDescriptionCollection.cs
- CatalogZone.cs
- ComplexTypeEmitter.cs
- OperationExecutionFault.cs
- OracleException.cs
- WindowsToolbarAsMenu.cs
- BitmapFrameDecode.cs
- UnsafePeerToPeerMethods.cs
- IisTraceWebEventProvider.cs
- Memoizer.cs
- DbUpdateCommandTree.cs
- Interlocked.cs
- DataView.cs
- SizeValueSerializer.cs
- DataColumnSelectionConverter.cs
- HttpResponseHeader.cs
- TrackingRecord.cs
- CodeDomComponentSerializationService.cs
- DesignerActionItemCollection.cs
- InstalledFontCollection.cs
- CounterCreationDataConverter.cs
- TypefaceMap.cs
- AppearanceEditorPart.cs
- WebPartUtil.cs
- ToggleButton.cs
- PersonalizationProviderHelper.cs
- ManipulationStartingEventArgs.cs
- DoubleIndependentAnimationStorage.cs
- MetafileHeaderWmf.cs
- MatrixAnimationUsingKeyFrames.cs
- CodeSnippetCompileUnit.cs
- RuntimeWrappedException.cs
- SocketException.cs
- DBNull.cs
- VSWCFServiceContractGenerator.cs
- CellParaClient.cs
- RequestQueryProcessor.cs
- IPAddress.cs
- UnsafeNativeMethodsMilCoreApi.cs
- TextureBrush.cs
- sqlmetadatafactory.cs
- Version.cs
- XmlTextReader.cs
- DataGridViewCellStyleEditor.cs
- DiscoveryDocumentSearchPattern.cs
- x509utils.cs
- ProcessModelSection.cs
- TypeDescriptor.cs
- WebPartCatalogAddVerb.cs
- X509ThumbprintKeyIdentifierClause.cs
- MsmqBindingMonitor.cs
- Attributes.cs
- RichTextBoxConstants.cs
- FileCodeGroup.cs
- ContextMenu.cs
- localization.cs
- Rule.cs
- DictionaryContent.cs
- MessagePropertyDescriptionCollection.cs
- HeaderCollection.cs
- mactripleDES.cs
- CharacterBuffer.cs
- MatchAttribute.cs
- TemplateBindingExtension.cs
- MatcherBuilder.cs
- DataListItemCollection.cs
- MatrixValueSerializer.cs
- TdsParser.cs
- SafeFileMappingHandle.cs
- webproxy.cs
- EDesignUtil.cs
- AxHostDesigner.cs
- WorkflowTimerService.cs
- ManipulationDevice.cs
- MultiPageTextView.cs