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
- AppDomain.cs
- COM2EnumConverter.cs
- SqlDataSourceTableQuery.cs
- InputManager.cs
- SortQuery.cs
- Command.cs
- RootBrowserWindowAutomationPeer.cs
- BindStream.cs
- FullTextState.cs
- DataStreamFromComStream.cs
- PrimitiveXmlSerializers.cs
- MembershipUser.cs
- VBIdentifierTrimConverter.cs
- IdentityHolder.cs
- SettingsPropertyIsReadOnlyException.cs
- BaseTemplateBuildProvider.cs
- precedingquery.cs
- ListViewTableCell.cs
- JavaScriptSerializer.cs
- NotSupportedException.cs
- SrgsDocument.cs
- DataGridRow.cs
- DataBoundControlHelper.cs
- LogLogRecord.cs
- MetadataFile.cs
- SpeechDetectedEventArgs.cs
- SoapCodeExporter.cs
- HtmlSelect.cs
- DesignColumn.cs
- FileDataSourceCache.cs
- XmlReaderDelegator.cs
- TableStyle.cs
- RenderData.cs
- QueryOptionExpression.cs
- COM2TypeInfoProcessor.cs
- HashRepartitionStream.cs
- ListDependantCardsRequest.cs
- DesignTimeSiteMapProvider.cs
- DBConcurrencyException.cs
- DbDataAdapter.cs
- SqlDataSourceFilteringEventArgs.cs
- DllNotFoundException.cs
- arc.cs
- SmtpDigestAuthenticationModule.cs
- DataGridViewEditingControlShowingEventArgs.cs
- DefaultTypeArgumentAttribute.cs
- HttpServerVarsCollection.cs
- WebPartEditorOkVerb.cs
- SerializationHelper.cs
- VisemeEventArgs.cs
- RangeValidator.cs
- GregorianCalendar.cs
- CanonicalFontFamilyReference.cs
- GrammarBuilderDictation.cs
- DiagnosticsConfigurationHandler.cs
- Attributes.cs
- Exception.cs
- InvalidCastException.cs
- WebConfigurationHostFileChange.cs
- SelectionRangeConverter.cs
- MouseBinding.cs
- VBIdentifierTrimConverter.cs
- ExtenderProvidedPropertyAttribute.cs
- StreamUpgradeInitiator.cs
- Currency.cs
- Message.cs
- FillBehavior.cs
- TraceSection.cs
- SafeRightsManagementPubHandle.cs
- CanonicalizationDriver.cs
- ReaderWriterLock.cs
- RemoveStoryboard.cs
- SelectorItemAutomationPeer.cs
- counter.cs
- ManipulationPivot.cs
- TemplatedWizardStep.cs
- SvcFileManager.cs
- HttpModuleActionCollection.cs
- StringCollection.cs
- NativeMethods.cs
- Boolean.cs
- ForwardPositionQuery.cs
- CodeSubDirectory.cs
- TagPrefixAttribute.cs
- StylusLogic.cs
- HandleCollector.cs
- EncoderBestFitFallback.cs
- Section.cs
- MediaElement.cs
- Point4DValueSerializer.cs
- LinqDataSourceDisposeEventArgs.cs
- HandlerMappingMemo.cs
- PlanCompiler.cs
- WeakReferenceKey.cs
- TextOutput.cs
- RadioButtonFlatAdapter.cs
- Boolean.cs
- ResXBuildProvider.cs
- NullToBooleanConverter.cs
- AssertSection.cs