Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / xsp / System / Web / Compilation / UserControlCodeDomTreeGenerator.cs / 1 / UserControlCodeDomTreeGenerator.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.Compilation { using System; using System.CodeDom; using System.Web.UI; internal class UserControlCodeDomTreeGenerator : TemplateControlCodeDomTreeGenerator { protected UserControlParser _ucParser; UserControlParser Parser { get { return _ucParser; } } internal UserControlCodeDomTreeGenerator(UserControlParser ucParser) : base(ucParser) { _ucParser = ucParser; } /* * Add metadata attributes to the class */ protected override void GenerateClassAttributes() { base.GenerateClassAttributes(); // If the user control has an OutputCache directive, generate // an attribute with the information about it. if (_sourceDataClass != null && Parser.OutputCacheParameters != null) { OutputCacheParameters cacheSettings = Parser.OutputCacheParameters; if (cacheSettings.Duration > 0) { CodeAttributeDeclaration attribDecl = new CodeAttributeDeclaration( "System.Web.UI.PartialCachingAttribute"); CodeAttributeArgument attribArg = new CodeAttributeArgument( new CodePrimitiveExpression(cacheSettings.Duration)); attribDecl.Arguments.Add(attribArg); attribArg = new CodeAttributeArgument(new CodePrimitiveExpression(cacheSettings.VaryByParam)); attribDecl.Arguments.Add(attribArg); attribArg = new CodeAttributeArgument(new CodePrimitiveExpression(cacheSettings.VaryByControl)); attribDecl.Arguments.Add(attribArg); attribArg = new CodeAttributeArgument(new CodePrimitiveExpression(cacheSettings.VaryByCustom)); attribDecl.Arguments.Add(attribArg); attribArg = new CodeAttributeArgument(new CodePrimitiveExpression(cacheSettings.SqlDependency)); attribDecl.Arguments.Add(attribArg); attribArg = new CodeAttributeArgument(new CodePrimitiveExpression(Parser.FSharedPartialCaching)); attribDecl.Arguments.Add(attribArg); _sourceDataClass.CustomAttributes.Add(attribDecl); } } } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- updatecommandorderer.cs
- SapiRecognizer.cs
- ToolStripRenderer.cs
- CodeGeneratorOptions.cs
- safesecurityhelperavalon.cs
- DefaultValueTypeConverter.cs
- BindingContext.cs
- PerformanceCounter.cs
- EventHandlers.cs
- MenuItemStyleCollection.cs
- LabelExpression.cs
- Pointer.cs
- Opcode.cs
- TemplateLookupAction.cs
- ViewStateException.cs
- VerticalAlignConverter.cs
- WebConfigurationManager.cs
- XmlAnyAttributeAttribute.cs
- MethodAccessException.cs
- MembershipPasswordException.cs
- SafeNativeMethods.cs
- ImmutableClientRuntime.cs
- MainMenu.cs
- Content.cs
- DetailsViewDeleteEventArgs.cs
- TabControlAutomationPeer.cs
- PenContexts.cs
- EventBookmark.cs
- XmlNodeReader.cs
- CircleHotSpot.cs
- WebPartVerbCollection.cs
- DecoderReplacementFallback.cs
- TargetException.cs
- ChtmlMobileTextWriter.cs
- AttributeEmitter.cs
- Triangle.cs
- AccessControlList.cs
- BatchStream.cs
- XmlMtomReader.cs
- NullableBoolConverter.cs
- RelOps.cs
- Base64Encoder.cs
- HexParser.cs
- CharUnicodeInfo.cs
- SemanticTag.cs
- CodeTypeMember.cs
- TogglePatternIdentifiers.cs
- EntityClientCacheKey.cs
- PropertyPathWorker.cs
- TrackingMemoryStreamFactory.cs
- DPCustomTypeDescriptor.cs
- ZipIOModeEnforcingStream.cs
- ColumnResult.cs
- DataGridColumnHeaderAutomationPeer.cs
- DropShadowBitmapEffect.cs
- XmlNavigatorStack.cs
- ReaderOutput.cs
- SHA512.cs
- TextDpi.cs
- GestureRecognitionResult.cs
- SelectionEditingBehavior.cs
- FormViewDeletedEventArgs.cs
- FontFamily.cs
- MessagingActivityHelper.cs
- DataServiceExpressionVisitor.cs
- Input.cs
- IsolationInterop.cs
- EntityDataSourceDesignerHelper.cs
- OperationResponse.cs
- TableProvider.cs
- OverlappedAsyncResult.cs
- ObjectQueryState.cs
- EncodingDataItem.cs
- GacUtil.cs
- InputDevice.cs
- ServiceHttpHandlerFactory.cs
- AssociationSetEnd.cs
- TextContainer.cs
- ExtendedProtectionPolicyElement.cs
- RegisteredHiddenField.cs
- OleDbReferenceCollection.cs
- EventLogHandle.cs
- InteropAutomationProvider.cs
- WrappedIUnknown.cs
- DescendentsWalkerBase.cs
- WindowsScrollBar.cs
- CompareValidator.cs
- PersonalizationAdministration.cs
- WindowsListViewScroll.cs
- FunctionImportMapping.cs
- OleDbError.cs
- ToggleButton.cs
- ColumnReorderedEventArgs.cs
- ModuleBuilder.cs
- EntityPropertyMappingAttribute.cs
- Crc32Helper.cs
- MachineKeyConverter.cs
- WindowsStatic.cs
- PublisherMembershipCondition.cs
- DataGridDetailsPresenter.cs