Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebResourceAttribute.cs / 1594420 / WebResourceAttribute.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI { using System; using System.ComponentModel; using System.Diagnostics.CodeAnalysis; using System.Web.Util; [AttributeUsage(AttributeTargets.Assembly, AllowMultiple=true)] public sealed class WebResourceAttribute : Attribute { private string _contentType; private bool _performSubstitution; private string _webResource; private string _cdnPath; private string _cdnPathSecureConnection; private bool _cdnSupportsSecureConnection; internal const string _microsoftCdnBasePath = "http://ajax.microsoft.com/ajax/4.0/1/"; public WebResourceAttribute(string webResource, string contentType) { if (String.IsNullOrEmpty(webResource)) { throw ExceptionUtil.ParameterNullOrEmpty("webResource"); } if (String.IsNullOrEmpty(contentType)) { throw ExceptionUtil.ParameterNullOrEmpty("contentType"); } _contentType = contentType; _webResource = webResource; _performSubstitution = false; } [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId="Cdn", Justification="Stands for Content Delivery Network.")] public string CdnPath { get { return _cdnPath ?? String.Empty; } set { _cdnPath = value; } } internal string CdnPathSecureConnection { get { if (_cdnPathSecureConnection == null) { string cdnPath = CdnPath; if (String.IsNullOrEmpty(cdnPath) || !CdnSupportsSecureConnection || !cdnPath.StartsWith("http://", StringComparison.OrdinalIgnoreCase)) { cdnPath = String.Empty; } else { // convert http to https cdnPath = "https" + cdnPath.Substring(4); } _cdnPathSecureConnection = cdnPath; } return _cdnPathSecureConnection; } } [SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Cdn", Justification = "Stands for Content Delivery Network.")] public bool CdnSupportsSecureConnection { get { return _cdnSupportsSecureConnection; } set { _cdnSupportsSecureConnection = value; } } public string ContentType { get { return _contentType; } } public bool PerformSubstitution { get { return _performSubstitution; } set { _performSubstitution = value; } } public string WebResource { get { return _webResource; } } } } // 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
- AnchoredBlock.cs
- TimerEventSubscription.cs
- EventRecord.cs
- StorageMappingFragment.cs
- TemplateControl.cs
- SoapProtocolImporter.cs
- ProxyWebPartConnectionCollection.cs
- SourceItem.cs
- CalendarAutoFormatDialog.cs
- ModulesEntry.cs
- DocumentAutomationPeer.cs
- PenLineCapValidation.cs
- BuildManagerHost.cs
- DataGridViewCheckBoxColumn.cs
- SatelliteContractVersionAttribute.cs
- DataColumnChangeEvent.cs
- CodeMemberField.cs
- DataTable.cs
- SoapFault.cs
- UnsafeNativeMethods.cs
- GradientSpreadMethodValidation.cs
- CompositionAdorner.cs
- EpmSyndicationContentSerializer.cs
- HtmlTextArea.cs
- HttpRequestWrapper.cs
- AspNetHostingPermission.cs
- NavigatorInput.cs
- XmlSchemaDatatype.cs
- RegexTypeEditor.cs
- GenerateTemporaryAssemblyTask.cs
- AssemblyAttributes.cs
- HttpProtocolReflector.cs
- EditorPartChrome.cs
- UserPreferenceChangedEventArgs.cs
- IsolatedStoragePermission.cs
- SoapIncludeAttribute.cs
- XmlSchemaException.cs
- CodeBlockBuilder.cs
- XmlSerializerAssemblyAttribute.cs
- FontStretch.cs
- TypeConverterAttribute.cs
- HtmlHistory.cs
- DefinitionUpdate.cs
- DependencyPropertyAttribute.cs
- ExceptionUtil.cs
- WebPartsSection.cs
- ToolStripItemImageRenderEventArgs.cs
- CapabilitiesUse.cs
- ExtensionQuery.cs
- safex509handles.cs
- ActionFrame.cs
- ExcludePathInfo.cs
- SqlDataSourceView.cs
- LocalizabilityAttribute.cs
- MenuStrip.cs
- ApplicationServiceHelper.cs
- ConfigurationFileMap.cs
- DataGridPagerStyle.cs
- AppLevelCompilationSectionCache.cs
- StorageAssociationTypeMapping.cs
- SoapCodeExporter.cs
- Renderer.cs
- UITypeEditor.cs
- SuppressIldasmAttribute.cs
- ScrollItemPatternIdentifiers.cs
- ConditionCollection.cs
- DataBinder.cs
- SortKey.cs
- GeneralTransform.cs
- DataGridViewColumnConverter.cs
- PageContent.cs
- RectAnimationBase.cs
- codemethodreferenceexpression.cs
- InternalRelationshipCollection.cs
- PageOutputQuality.cs
- UIElementHelper.cs
- DataGridViewControlCollection.cs
- AsymmetricKeyExchangeDeformatter.cs
- SessionPageStatePersister.cs
- BinaryObjectInfo.cs
- RectAnimation.cs
- DataGridViewColumnCollection.cs
- ToolBar.cs
- GradientBrush.cs
- ClipboardProcessor.cs
- SurrogateSelector.cs
- OracleDataAdapter.cs
- StyleBamlTreeBuilder.cs
- ObjectManager.cs
- ConditionCollection.cs
- NavigationHelper.cs
- GACIdentityPermission.cs
- ToolStripGrip.cs
- SamlAuthenticationClaimResource.cs
- BaseProcessProtocolHandler.cs
- HostedTransportConfigurationManager.cs
- RegisterResponseInfo.cs
- Currency.cs
- DataListAutoFormat.cs
- IntegerFacetDescriptionElement.cs