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
- ContentPropertyAttribute.cs
- SingleTagSectionHandler.cs
- Point4DConverter.cs
- FactoryRecord.cs
- DataListItemEventArgs.cs
- ToolStripDropDownItemDesigner.cs
- RelatedImageListAttribute.cs
- LabelEditEvent.cs
- FixedSOMLineRanges.cs
- GeometryModel3D.cs
- URLAttribute.cs
- RevocationPoint.cs
- CqlIdentifiers.cs
- FileLevelControlBuilderAttribute.cs
- RSACryptoServiceProvider.cs
- assertwrapper.cs
- LineServicesCallbacks.cs
- HandlerMappingMemo.cs
- PersonalizationDictionary.cs
- SafeFileMappingHandle.cs
- ValidationSummary.cs
- TemplatePropertyEntry.cs
- AnnotationDocumentPaginator.cs
- OutputCacheSection.cs
- HuffmanTree.cs
- DbProviderConfigurationHandler.cs
- ProvidersHelper.cs
- ObjectAnimationBase.cs
- RegexRunner.cs
- Base64Encoder.cs
- SynchronizingStream.cs
- ParseHttpDate.cs
- TypeElement.cs
- StructuralCache.cs
- DiscardableAttribute.cs
- PointHitTestResult.cs
- WhitespaceSignificantCollectionAttribute.cs
- ControlAdapter.cs
- CodeVariableDeclarationStatement.cs
- WebPartAuthorizationEventArgs.cs
- RadialGradientBrush.cs
- AdditionalEntityFunctions.cs
- GorillaCodec.cs
- XpsThumbnail.cs
- SqlNotificationRequest.cs
- Point3DIndependentAnimationStorage.cs
- DefaultWorkflowTransactionService.cs
- ScrollItemProviderWrapper.cs
- UnicastIPAddressInformationCollection.cs
- CodeMemberMethod.cs
- ChangePassword.cs
- DetailsViewPageEventArgs.cs
- SigningCredentials.cs
- XmlDeclaration.cs
- BamlBinaryReader.cs
- MetadataArtifactLoaderComposite.cs
- TableRowGroup.cs
- EditorReuseAttribute.cs
- MultiAsyncResult.cs
- InstanceValue.cs
- RegistryKey.cs
- XPathChildIterator.cs
- FontEmbeddingManager.cs
- Peer.cs
- EmptyQuery.cs
- SafeCryptoHandles.cs
- Vector3DCollectionValueSerializer.cs
- FilteredDataSetHelper.cs
- SpecialNameAttribute.cs
- FlowDocumentScrollViewer.cs
- SmtpCommands.cs
- XamlRtfConverter.cs
- Array.cs
- ProviderUtil.cs
- WindowsSecurityToken.cs
- MetadataItem.cs
- GridViewRow.cs
- ShortcutKeysEditor.cs
- XmlILModule.cs
- CheckBoxRenderer.cs
- TextFormatterImp.cs
- URI.cs
- Rijndael.cs
- PageEventArgs.cs
- XmlQueryStaticData.cs
- SecUtil.cs
- IntSecurity.cs
- FlagsAttribute.cs
- QuotedPrintableStream.cs
- UndoManager.cs
- srgsitem.cs
- COM2EnumConverter.cs
- ImmutableCollection.cs
- ByeMessageCD1.cs
- XmlAtomicValue.cs
- TailPinnedEventArgs.cs
- FilteredAttributeCollection.cs
- EdmFunctionAttribute.cs
- Logging.cs
- ByteConverter.cs