Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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); } } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// 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); } } } } } // 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
- RequestCacheValidator.cs
- ScriptReference.cs
- FileSecurity.cs
- MarkupWriter.cs
- DataBindingExpressionBuilder.cs
- IriParsingElement.cs
- AxWrapperGen.cs
- ElementFactory.cs
- OleServicesContext.cs
- ScriptModule.cs
- Style.cs
- Binding.cs
- SocketInformation.cs
- BaseParser.cs
- FlowDocument.cs
- ListenerElementsCollection.cs
- TraceRecord.cs
- TableParagraph.cs
- StructuredProperty.cs
- CodeGroup.cs
- DataSourceHelper.cs
- ObjectHandle.cs
- LayoutTable.cs
- PersistenceProvider.cs
- InputLanguageCollection.cs
- ProfileSettingsCollection.cs
- ReachUIElementCollectionSerializerAsync.cs
- ExecutedRoutedEventArgs.cs
- BaseDataListComponentEditor.cs
- Group.cs
- ProviderConnectionPoint.cs
- CalendarData.cs
- CompilerError.cs
- XmlArrayAttribute.cs
- ProcessProtocolHandler.cs
- NamedPipeProcessProtocolHandler.cs
- AsnEncodedData.cs
- DataComponentMethodGenerator.cs
- IndicFontClient.cs
- AssemblyBuilder.cs
- EventLog.cs
- ParseElement.cs
- keycontainerpermission.cs
- Polygon.cs
- PixelFormatConverter.cs
- ErrorEventArgs.cs
- FamilyCollection.cs
- ExtensionWindowResizeGrip.cs
- coordinatorscratchpad.cs
- InfiniteIntConverter.cs
- AssemblyBuilder.cs
- ClientFormsAuthenticationMembershipProvider.cs
- NotSupportedException.cs
- StringInfo.cs
- BaseCAMarshaler.cs
- SettingsAttributes.cs
- PasswordDeriveBytes.cs
- AnimatedTypeHelpers.cs
- DynamicDocumentPaginator.cs
- CompiledQueryCacheKey.cs
- ModifierKeysConverter.cs
- ComponentEvent.cs
- CDSCollectionETWBCLProvider.cs
- DataGridViewColumn.cs
- HeaderUtility.cs
- DataServiceProcessingPipelineEventArgs.cs
- SafePointer.cs
- RegistrySecurity.cs
- UriTemplateMatchException.cs
- MembershipSection.cs
- Vector.cs
- CollectionChangedEventManager.cs
- ComUdtElement.cs
- listitem.cs
- XmlUtf8RawTextWriter.cs
- PasswordDeriveBytes.cs
- ManifestResourceInfo.cs
- CalendarKeyboardHelper.cs
- _NativeSSPI.cs
- XmlUnspecifiedAttribute.cs
- CorrelationKeyCalculator.cs
- MetadataItemSerializer.cs
- _UriSyntax.cs
- OleDbConnectionFactory.cs
- DataSourceCacheDurationConverter.cs
- Filter.cs
- TextBlock.cs
- NavigationProgressEventArgs.cs
- DivideByZeroException.cs
- MetadataPropertyvalue.cs
- DataSourceCacheDurationConverter.cs
- sitestring.cs
- Splitter.cs
- IPCCacheManager.cs
- IndependentlyAnimatedPropertyMetadata.cs
- MonikerBuilder.cs
- DBSchemaTable.cs
- DesignerSerializerAttribute.cs
- XPathAncestorIterator.cs
- XmlSchemaSimpleContentRestriction.cs