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
- XmlILAnnotation.cs
- AuthenticationSection.cs
- HtmlElementEventArgs.cs
- DecoderExceptionFallback.cs
- DashStyles.cs
- ResourcesBuildProvider.cs
- ILGen.cs
- IdleTimeoutMonitor.cs
- ImagingCache.cs
- ZipFileInfoCollection.cs
- DbDataReader.cs
- DataGridViewCheckBoxColumn.cs
- GeometryCollection.cs
- PolygonHotSpot.cs
- DefaultDiscoveryServiceExtension.cs
- GPRECTF.cs
- ScriptDescriptor.cs
- HandledEventArgs.cs
- DropDownList.cs
- isolationinterop.cs
- TypeHelper.cs
- FileUpload.cs
- EUCJPEncoding.cs
- XmlSerializerVersionAttribute.cs
- WebMessageEncodingBindingElement.cs
- TwoPhaseCommitProxy.cs
- AttributeSetAction.cs
- Avt.cs
- TypeDescriptionProvider.cs
- cookiecontainer.cs
- HMACSHA256.cs
- OrderedDictionary.cs
- Html32TextWriter.cs
- SwitchLevelAttribute.cs
- ToolStripContainerActionList.cs
- EventNotify.cs
- ControlPaint.cs
- ToolbarAUtomationPeer.cs
- PropertyPath.cs
- RightsManagementPermission.cs
- MachinePropertyVariants.cs
- XamlStream.cs
- ContentPlaceHolder.cs
- BaseUriHelper.cs
- BaseTreeIterator.cs
- BlobPersonalizationState.cs
- FrameworkReadOnlyPropertyMetadata.cs
- NamespaceImport.cs
- ModelProperty.cs
- XmlAnyElementAttribute.cs
- ContentAlignmentEditor.cs
- AttributeEmitter.cs
- SelectionRangeConverter.cs
- AttributeCollection.cs
- QilXmlWriter.cs
- DbTypeMap.cs
- AsyncStreamReader.cs
- QuaternionAnimationUsingKeyFrames.cs
- WindowsIdentity.cs
- XmlHierarchyData.cs
- sqlser.cs
- EdmValidator.cs
- MatrixTransform3D.cs
- CodeCompileUnit.cs
- HttpProfileGroupBase.cs
- ControlParameter.cs
- GradientSpreadMethodValidation.cs
- WebHttpBindingCollectionElement.cs
- TdsParserStateObject.cs
- WindowsScrollBar.cs
- TypedTableBaseExtensions.cs
- CompositeTypefaceMetrics.cs
- OpCodes.cs
- RowToFieldTransformer.cs
- BooleanFacetDescriptionElement.cs
- ResourceProperty.cs
- DataObjectPastingEventArgs.cs
- DataServices.cs
- IERequestCache.cs
- Console.cs
- Image.cs
- VersionedStreamOwner.cs
- StringDictionary.cs
- ProviderIncompatibleException.cs
- JournalNavigationScope.cs
- FormatConvertedBitmap.cs
- TreeViewAutomationPeer.cs
- RootCodeDomSerializer.cs
- DataGridViewButtonCell.cs
- ScriptMethodAttribute.cs
- StorageModelBuildProvider.cs
- SerialErrors.cs
- ServiceOperationParameter.cs
- BuildProvider.cs
- WorkflowDefinitionDispenser.cs
- WS2007FederationHttpBindingElement.cs
- UnsafeNativeMethods.cs
- ServicePoint.cs
- GlobalEventManager.cs
- RewritingProcessor.cs