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
- IsolationInterop.cs
- AutomationPatternInfo.cs
- HttpCookiesSection.cs
- XPathItem.cs
- BindStream.cs
- InkCanvasSelection.cs
- CrossContextChannel.cs
- FixedStringLookup.cs
- Stroke.cs
- DataGridLengthConverter.cs
- DataSysAttribute.cs
- SoapRpcMethodAttribute.cs
- ApplicationProxyInternal.cs
- CommandSet.cs
- ByteStorage.cs
- DocumentsTrace.cs
- ContextProperty.cs
- BitStack.cs
- XMLSyntaxException.cs
- ShadowGlyph.cs
- DataGridViewDataErrorEventArgs.cs
- ExpandCollapsePattern.cs
- HtmlGenericControl.cs
- _TLSstream.cs
- NoneExcludedImageIndexConverter.cs
- SQLConvert.cs
- WorkflowApplicationTerminatedException.cs
- TypeExtensionSerializer.cs
- SortedList.cs
- UIEndRequest.cs
- CompressionTransform.cs
- DataBindingExpressionBuilder.cs
- QueueProcessor.cs
- MimeBasePart.cs
- ServiceNameElement.cs
- ProfileElement.cs
- MobileCapabilities.cs
- InfoCardAsymmetricCrypto.cs
- AppDomainProtocolHandler.cs
- ThreadSafeList.cs
- BadImageFormatException.cs
- Win32SafeHandles.cs
- CodeSubDirectory.cs
- _NTAuthentication.cs
- NativeMethods.cs
- SplineKeyFrames.cs
- PermissionToken.cs
- ElementsClipboardData.cs
- Table.cs
- DynamicEntity.cs
- IsolatedStorageFilePermission.cs
- DbCommandTree.cs
- rsa.cs
- EncodingDataItem.cs
- MessageQueueKey.cs
- DefaultEventAttribute.cs
- PlanCompilerUtil.cs
- UnknownWrapper.cs
- MetadataArtifactLoaderXmlReaderWrapper.cs
- WorkflowViewStateService.cs
- GridViewCommandEventArgs.cs
- ReadWriteSpinLock.cs
- TileModeValidation.cs
- CaseInsensitiveOrdinalStringComparer.cs
- PngBitmapEncoder.cs
- StylusPointPropertyInfoDefaults.cs
- TreeViewDataItemAutomationPeer.cs
- CheckBoxPopupAdapter.cs
- DataServiceQuery.cs
- XmlDataSource.cs
- PriorityRange.cs
- FieldAccessException.cs
- KnownColorTable.cs
- TaskExceptionHolder.cs
- MimeFormImporter.cs
- UserValidatedEventArgs.cs
- XmlNodeList.cs
- ServiceSettingsResponseInfo.cs
- ClientUrlResolverWrapper.cs
- FileDialog_Vista.cs
- EncryptedType.cs
- StreamWriter.cs
- StylusEditingBehavior.cs
- QilInvokeEarlyBound.cs
- DateTimeSerializationSection.cs
- WrapPanel.cs
- PropertyOrder.cs
- OuterGlowBitmapEffect.cs
- EntityModelBuildProvider.cs
- CatalogUtil.cs
- RegistryKey.cs
- DataGridViewButtonColumn.cs
- DataTemplateSelector.cs
- HttpSysSettings.cs
- Int32Collection.cs
- TraceListener.cs
- ModelItemDictionaryImpl.cs
- WindowsProgressbar.cs
- Misc.cs
- XmlIlTypeHelper.cs