Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / DEVDIV / depot / DevDiv / releases / whidbey / QFE / 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. //------------------------------------------------------------------------------ //// 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.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- MediaContext.cs
- DataSetMappper.cs
- ContravarianceAdapter.cs
- DesigntimeLicenseContext.cs
- WorkflowPageSetupDialog.cs
- PropertyDescriptorCollection.cs
- SchemaLookupTable.cs
- InkCanvasAutomationPeer.cs
- DatePickerTextBox.cs
- HTMLTextWriter.cs
- SchemaElementDecl.cs
- ControlPropertyNameConverter.cs
- ContextProperty.cs
- WpfWebRequestHelper.cs
- TaiwanCalendar.cs
- ToolStripPanelCell.cs
- ActiveXHost.cs
- SelectionPattern.cs
- ConsoleKeyInfo.cs
- ToolBarButtonClickEvent.cs
- MatrixTransform.cs
- EntityClientCacheKey.cs
- XsltContext.cs
- DateTimeStorage.cs
- BitStream.cs
- IndicFontClient.cs
- ContentControl.cs
- BatchParser.cs
- ReliableSessionElement.cs
- DataGridViewLayoutData.cs
- ToolStripButton.cs
- DataGridViewTopRowAccessibleObject.cs
- EUCJPEncoding.cs
- WindowsGraphicsCacheManager.cs
- cookie.cs
- SqlStatistics.cs
- PointAnimation.cs
- OpenTypeLayout.cs
- PipelineModuleStepContainer.cs
- BitFlagsGenerator.cs
- HwndProxyElementProvider.cs
- HybridCollection.cs
- Cloud.cs
- Selection.cs
- PackageFilter.cs
- SqlDuplicator.cs
- Maps.cs
- BatchParser.cs
- SortDescriptionCollection.cs
- Logging.cs
- RangeValuePattern.cs
- Ops.cs
- XmlSchemaObjectCollection.cs
- DetailsViewUpdatedEventArgs.cs
- HitTestParameters3D.cs
- TransformConverter.cs
- ExtentKey.cs
- ImageSource.cs
- Command.cs
- ColorMap.cs
- ConfigurationValues.cs
- SqlLiftIndependentRowExpressions.cs
- AutoResizedEvent.cs
- ConfigurationSettings.cs
- ArrayList.cs
- RtType.cs
- HostAdapter.cs
- SchemaElementDecl.cs
- HandleRef.cs
- DataGridState.cs
- TraceContext.cs
- TargetControlTypeCache.cs
- SHA256Managed.cs
- Console.cs
- PerformanceCounterLib.cs
- DataGridViewHitTestInfo.cs
- CodeMemberField.cs
- TextPointerBase.cs
- SmtpNtlmAuthenticationModule.cs
- ExtendedPropertyDescriptor.cs
- DataGridViewComboBoxColumn.cs
- TextChangedEventArgs.cs
- WindowsUserNameSecurityTokenAuthenticator.cs
- DataGridViewBand.cs
- AnnotationComponentManager.cs
- DataGridViewLinkColumn.cs
- MbpInfo.cs
- MessageSecurityOverTcpElement.cs
- AnimationException.cs
- EqualityComparer.cs
- CommonRemoteMemoryBlock.cs
- CellTreeNodeVisitors.cs
- TagMapCollection.cs
- DrawingAttributeSerializer.cs
- _NestedSingleAsyncResult.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- XsltContext.cs
- SQLMoneyStorage.cs
- GenericAuthenticationEventArgs.cs
- ServicePoint.cs