Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Extensions / UI / ScriptResourceDefinition.cs / 1305376 / ScriptResourceDefinition.cs
namespace System.Web.UI { using System; using System.Reflection; public class ScriptResourceDefinition : IScriptResourceDefinition { private string _path; private string _debugPath; private string _resourceName; private Assembly _resourceAssembly; private string _cdnPath; private string _cdnDebugPath; private string _cdnPathSecureConnection; private string _cdnDebugPathSecureConnection; private bool _cdnSupportsSecureConnection; public string CdnDebugPath { get { return _cdnDebugPath ?? String.Empty; } set { _cdnDebugPath = value; } } public string CdnPath { get { return _cdnPath ?? String.Empty; } set { _cdnPath = value; } } internal string CdnDebugPathSecureConnection { get { if (_cdnDebugPathSecureConnection == null) { _cdnDebugPathSecureConnection = GetSecureCdnPath(CdnDebugPath); } return _cdnDebugPathSecureConnection; } } internal string CdnPathSecureConnection { get { if (_cdnPathSecureConnection == null) { _cdnPathSecureConnection = GetSecureCdnPath(CdnPath); } return _cdnPathSecureConnection; } } public bool CdnSupportsSecureConnection { get { return _cdnSupportsSecureConnection; } set { _cdnSupportsSecureConnection = value; } } public string DebugPath { get { return _debugPath ?? String.Empty; } set { _debugPath = value; } } public string Path { get { return _path ?? String.Empty; } set { _path = value; } } public Assembly ResourceAssembly { get { return _resourceAssembly; } set { _resourceAssembly = value; } } public string ResourceName { get { return _resourceName ?? String.Empty; } set { _resourceName = value; } } private string GetSecureCdnPath(string unsecurePath) { string cdnPath = String.Empty; if (!String.IsNullOrEmpty(unsecurePath)) { if (_cdnSupportsSecureConnection) { // convert 'http' to 'https' if (unsecurePath.StartsWith("http://", StringComparison.OrdinalIgnoreCase)) { cdnPath = "https" + unsecurePath.Substring(4); } else { // cdnPath is not 'http' so we cannot determine the secure path cdnPath = String.Empty; } } else { cdnPath = String.Empty; } } return cdnPath; } string IScriptResourceDefinition.CdnPathSecureConnection { get { return CdnPathSecureConnection; } } string IScriptResourceDefinition.CdnDebugPathSecureConnection { get { return CdnDebugPathSecureConnection; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. namespace System.Web.UI { using System; using System.Reflection; public class ScriptResourceDefinition : IScriptResourceDefinition { private string _path; private string _debugPath; private string _resourceName; private Assembly _resourceAssembly; private string _cdnPath; private string _cdnDebugPath; private string _cdnPathSecureConnection; private string _cdnDebugPathSecureConnection; private bool _cdnSupportsSecureConnection; public string CdnDebugPath { get { return _cdnDebugPath ?? String.Empty; } set { _cdnDebugPath = value; } } public string CdnPath { get { return _cdnPath ?? String.Empty; } set { _cdnPath = value; } } internal string CdnDebugPathSecureConnection { get { if (_cdnDebugPathSecureConnection == null) { _cdnDebugPathSecureConnection = GetSecureCdnPath(CdnDebugPath); } return _cdnDebugPathSecureConnection; } } internal string CdnPathSecureConnection { get { if (_cdnPathSecureConnection == null) { _cdnPathSecureConnection = GetSecureCdnPath(CdnPath); } return _cdnPathSecureConnection; } } public bool CdnSupportsSecureConnection { get { return _cdnSupportsSecureConnection; } set { _cdnSupportsSecureConnection = value; } } public string DebugPath { get { return _debugPath ?? String.Empty; } set { _debugPath = value; } } public string Path { get { return _path ?? String.Empty; } set { _path = value; } } public Assembly ResourceAssembly { get { return _resourceAssembly; } set { _resourceAssembly = value; } } public string ResourceName { get { return _resourceName ?? String.Empty; } set { _resourceName = value; } } private string GetSecureCdnPath(string unsecurePath) { string cdnPath = String.Empty; if (!String.IsNullOrEmpty(unsecurePath)) { if (_cdnSupportsSecureConnection) { // convert 'http' to 'https' if (unsecurePath.StartsWith("http://", StringComparison.OrdinalIgnoreCase)) { cdnPath = "https" + unsecurePath.Substring(4); } else { // cdnPath is not 'http' so we cannot determine the secure path cdnPath = String.Empty; } } else { cdnPath = String.Empty; } } return cdnPath; } string IScriptResourceDefinition.CdnPathSecureConnection { get { return CdnPathSecureConnection; } } string IScriptResourceDefinition.CdnDebugPathSecureConnection { get { return CdnDebugPathSecureConnection; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- SubclassTypeValidator.cs
- Condition.cs
- SharedPersonalizationStateInfo.cs
- RemotingServices.cs
- SessionEndingCancelEventArgs.cs
- HtmlHead.cs
- ObjectSecurity.cs
- ECDiffieHellmanPublicKey.cs
- Rotation3DAnimationUsingKeyFrames.cs
- FixUpCollection.cs
- HttpPostProtocolImporter.cs
- ImageDrawing.cs
- SafeThemeHandle.cs
- SimplePropertyEntry.cs
- Int32Collection.cs
- EventLogger.cs
- InheritanceRules.cs
- SHA1Managed.cs
- ParameterModifier.cs
- AmbientValueAttribute.cs
- RoutedPropertyChangedEventArgs.cs
- SynchronizedDispatch.cs
- TargetControlTypeAttribute.cs
- MemberDescriptor.cs
- DeviceFilterDictionary.cs
- GenericTextProperties.cs
- Config.cs
- SqlDataRecord.cs
- OracleNumber.cs
- XPathBuilder.cs
- SqlClientMetaDataCollectionNames.cs
- XmlStringTable.cs
- SQLSingleStorage.cs
- PrintPageEvent.cs
- HideDisabledControlAdapter.cs
- SchemaTableOptionalColumn.cs
- HttpBrowserCapabilitiesBase.cs
- XmlNavigatorStack.cs
- CommonDialog.cs
- DataBindEngine.cs
- DateTimeFormatInfo.cs
- ResourceSet.cs
- UserControlCodeDomTreeGenerator.cs
- ConfigurationManagerInternal.cs
- AlternationConverter.cs
- WS2007HttpBinding.cs
- InstanceContext.cs
- BinaryFormatterWriter.cs
- ScriptResourceInfo.cs
- ChannelServices.cs
- SmiConnection.cs
- EventToken.cs
- CustomAttribute.cs
- AssemblyEvidenceFactory.cs
- DataTableReader.cs
- DataSourceHelper.cs
- ContainsRowNumberChecker.cs
- BindingContext.cs
- SmiMetaDataProperty.cs
- SecurityTokenSpecification.cs
- ReaderWriterLockSlim.cs
- UpDownEvent.cs
- StartUpEventArgs.cs
- _RegBlobWebProxyDataBuilder.cs
- ObsoleteAttribute.cs
- ContractNamespaceAttribute.cs
- TextElement.cs
- PageSetupDialog.cs
- DoubleUtil.cs
- ConfigDefinitionUpdates.cs
- SizeValueSerializer.cs
- TreeWalkHelper.cs
- Attributes.cs
- DataStreams.cs
- ResourceDescriptionAttribute.cs
- XmlDocumentFragment.cs
- DesignOnlyAttribute.cs
- ArgumentNullException.cs
- ModelItemDictionary.cs
- ConfigDefinitionUpdates.cs
- BuildResultCache.cs
- HandlerFactoryWrapper.cs
- Font.cs
- ServiceReflector.cs
- DynamicRendererThreadManager.cs
- SynchronousReceiveBehavior.cs
- PresentationUIStyleResources.cs
- OperationDescription.cs
- RuntimeWrappedException.cs
- WmlSelectionListAdapter.cs
- ParagraphVisual.cs
- XmlSchema.cs
- BoundColumn.cs
- AssociationTypeEmitter.cs
- ProjectionRewriter.cs
- PrintingPermission.cs
- SmiContext.cs
- TraceHandlerErrorFormatter.cs
- BaseValidator.cs
- ResourcesBuildProvider.cs