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
- SqlTransaction.cs
- DocumentApplication.cs
- MemoryFailPoint.cs
- SmtpNtlmAuthenticationModule.cs
- ValidatorCompatibilityHelper.cs
- ShaderEffect.cs
- Compress.cs
- streamingZipPartStream.cs
- Label.cs
- XmlKeywords.cs
- AtomMaterializer.cs
- ComponentEditorForm.cs
- MatrixAnimationUsingPath.cs
- Debugger.cs
- _NestedSingleAsyncResult.cs
- backend.cs
- ProfileInfo.cs
- XmlWhitespace.cs
- PreviewKeyDownEventArgs.cs
- AutoGeneratedField.cs
- DelayLoadType.cs
- InvokeBase.cs
- XmlFormatExtensionPointAttribute.cs
- dtdvalidator.cs
- EmptyEnumerator.cs
- Missing.cs
- RegexStringValidator.cs
- ListViewItem.cs
- WebPartManager.cs
- XamlSerializer.cs
- SchemaImporter.cs
- FlowNode.cs
- GeometryValueSerializer.cs
- BindingMemberInfo.cs
- SmiEventSink.cs
- ObjectIDGenerator.cs
- CodeCastExpression.cs
- SoapHeader.cs
- TextTreeDeleteContentUndoUnit.cs
- Animatable.cs
- _SpnDictionary.cs
- Schema.cs
- SortedList.cs
- CodeAccessPermission.cs
- EventlogProvider.cs
- SuppressMessageAttribute.cs
- ViewValidator.cs
- PersonalizationProviderHelper.cs
- SHA512CryptoServiceProvider.cs
- DeleteMemberBinder.cs
- AuthenticationSection.cs
- PassportAuthenticationEventArgs.cs
- IssuedSecurityTokenParameters.cs
- SmtpClient.cs
- Polyline.cs
- InfoCardArgumentException.cs
- DtrList.cs
- CompilerInfo.cs
- TextBounds.cs
- SQLInt64Storage.cs
- RelOps.cs
- ManualResetEventSlim.cs
- SQLInt16.cs
- SqlCharStream.cs
- EventSinkActivity.cs
- SearchForVirtualItemEventArgs.cs
- SyntaxCheck.cs
- StylusButtonEventArgs.cs
- QueuePropertyVariants.cs
- ListBoxAutomationPeer.cs
- MessageBox.cs
- SqlReorderer.cs
- FormViewDeletedEventArgs.cs
- DataGridViewRowsRemovedEventArgs.cs
- PageThemeCodeDomTreeGenerator.cs
- TrackingRecord.cs
- IResourceProvider.cs
- LateBoundBitmapDecoder.cs
- CodeVariableReferenceExpression.cs
- MultiBinding.cs
- ControlType.cs
- PropertyStore.cs
- Win32KeyboardDevice.cs
- Slider.cs
- SafeHandle.cs
- EventlogProvider.cs
- Size.cs
- MetadataCache.cs
- RangeValidator.cs
- FileReservationCollection.cs
- SafePEFileHandle.cs
- PublisherIdentityPermission.cs
- mactripleDES.cs
- _ServiceNameStore.cs
- Label.cs
- NameScope.cs
- Native.cs
- TypeUsage.cs
- TdsEnums.cs
- XPathParser.cs