Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- DataGridViewControlCollection.cs
- DataAdapter.cs
- ControlCachePolicy.cs
- DisplayInformation.cs
- LayoutInformation.cs
- SQLByteStorage.cs
- IWorkflowDebuggerService.cs
- ForwardPositionQuery.cs
- ApplicationTrust.cs
- GatewayDefinition.cs
- RequiredFieldValidator.cs
- SchemaInfo.cs
- SecurityPolicySection.cs
- SecurityUtils.cs
- ProfileParameter.cs
- RegisteredExpandoAttribute.cs
- XmlUtf8RawTextWriter.cs
- XmlDownloadManager.cs
- HierarchicalDataBoundControl.cs
- ScriptRef.cs
- UniqueIdentifierService.cs
- SrgsRulesCollection.cs
- X509ChainElement.cs
- BaseParaClient.cs
- QilParameter.cs
- XmlSchemaParticle.cs
- HttpCapabilitiesEvaluator.cs
- DoubleLinkListEnumerator.cs
- SchemaLookupTable.cs
- XmlDocumentSchema.cs
- DataSourceListEditor.cs
- RequiredFieldValidator.cs
- PropertyItem.cs
- ProtocolsConfiguration.cs
- DerivedKeyCachingSecurityTokenSerializer.cs
- securitycriticaldataformultiplegetandset.cs
- VectorAnimationUsingKeyFrames.cs
- TableLayoutCellPaintEventArgs.cs
- Geometry3D.cs
- ManagedFilter.cs
- SqlConnectionPoolProviderInfo.cs
- TdsParserHelperClasses.cs
- ExceptionHelpers.cs
- CompilerGeneratedAttribute.cs
- FacetDescriptionElement.cs
- XsdDataContractImporter.cs
- DependsOnAttribute.cs
- TemplateColumn.cs
- AtomParser.cs
- UpdateException.cs
- XmlAttribute.cs
- ExpressionVisitor.cs
- ObjRef.cs
- HtmlElementCollection.cs
- SectionRecord.cs
- ExponentialEase.cs
- RawTextInputReport.cs
- AsyncDataRequest.cs
- TypeNameParser.cs
- WindowsTokenRoleProvider.cs
- SuppressIldasmAttribute.cs
- ServiceHttpModule.cs
- PeerObject.cs
- SessionStateContainer.cs
- WebPartConnectVerb.cs
- ScrollContentPresenter.cs
- DefinitionBase.cs
- AssociationTypeEmitter.cs
- TypeExtensions.cs
- PrtTicket_Public_Simple.cs
- DeviceSpecificChoiceCollection.cs
- Overlapped.cs
- ColumnCollection.cs
- ExeConfigurationFileMap.cs
- DocumentsTrace.cs
- TextTreeRootTextBlock.cs
- PathFigureCollectionConverter.cs
- DebuggerService.cs
- SingleConverter.cs
- LinkClickEvent.cs
- BookmarkList.cs
- WarningException.cs
- Line.cs
- MetadataUtilsSmi.cs
- MeasurementDCInfo.cs
- DbProviderConfigurationHandler.cs
- HwndTarget.cs
- DrawToolTipEventArgs.cs
- TextEditorDragDrop.cs
- XmlSchemaAll.cs
- UserNamePasswordClientCredential.cs
- GenericWebPart.cs
- DataGridCell.cs
- TextProperties.cs
- ImageFormatConverter.cs
- XmlSchemas.cs
- CodeAttributeArgumentCollection.cs
- ISO2022Encoding.cs
- Internal.cs
- TextParaLineResult.cs