Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Core / MS / Internal / Resources / ContentFileHelper.cs / 2 / ContentFileHelper.cs
// Copyright (c) Microsoft Corporation, 2001 // // File: ContentFileHelper.cs // //------------------------------------------------------------------------------ using System; using System.Reflection; using System.Windows.Resources; using System.Windows.Navigation; using System.Collections.Generic; namespace MS.Internal.Resources { //// ContentFileHelper class provides helper method to get assembly // associated content files. // internal static class ContentFileHelper { internal static bool IsContentFile(string partName) { if (_contentFiles == null) { _contentFiles = GetContentFiles(BaseUriHelper.ResourceAssembly); } if (_contentFiles != null && _contentFiles.Count > 0) { if (_contentFiles.ContainsKey(partName)) { return true; } } return false; } // // Get a list of Content Files for a given Assembly. // static internal DictionaryGetContentFiles(Assembly asm) { Dictionary contentFiles = null; Attribute[] assemblyAttributes; if (asm == null) { asm = BaseUriHelper.ResourceAssembly; if (asm == null) { // If we have no entry assembly return an empty list because // we can't have any content files. return new Dictionary (); } } assemblyAttributes = Attribute.GetCustomAttributes( asm, typeof(AssemblyAssociatedContentFileAttribute)); if (assemblyAttributes != null && assemblyAttributes.Length > 0) { contentFiles = new Dictionary (assemblyAttributes.Length, StringComparer.OrdinalIgnoreCase); for (int i=0; i _contentFiles; } } // 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
- UInt16Storage.cs
- EventLogQuery.cs
- BamlLocalizationDictionary.cs
- EntitySetBase.cs
- RoleManagerModule.cs
- DefaultExpressionVisitor.cs
- WebSysDefaultValueAttribute.cs
- RtType.cs
- XmlIncludeAttribute.cs
- HttpDigestClientCredential.cs
- SafeHGlobalHandleCritical.cs
- ISFTagAndGuidCache.cs
- basecomparevalidator.cs
- ScrollData.cs
- Function.cs
- HistoryEventArgs.cs
- DataGridViewUtilities.cs
- SettingsPropertyNotFoundException.cs
- WmfPlaceableFileHeader.cs
- DataStreamFromComStream.cs
- documentation.cs
- peersecuritysettings.cs
- RenderingBiasValidation.cs
- SemaphoreSecurity.cs
- StyleSelector.cs
- SearchExpression.cs
- MemoryFailPoint.cs
- Timeline.cs
- HttpListenerContext.cs
- ReliableMessagingHelpers.cs
- SqlServer2KCompatibilityAnnotation.cs
- HttpCapabilitiesSectionHandler.cs
- TrustLevelCollection.cs
- HttpResponseInternalWrapper.cs
- CommentEmitter.cs
- PhysicalAddress.cs
- IdleTimeoutMonitor.cs
- UnmanagedMemoryStreamWrapper.cs
- TransformGroup.cs
- DateTimeOffset.cs
- FastEncoder.cs
- AccessDataSourceView.cs
- EntityDataSourceState.cs
- PropertyDescriptorComparer.cs
- DesignerRegionCollection.cs
- DataDocumentXPathNavigator.cs
- NativeMethods.cs
- WebPartChrome.cs
- FileIOPermission.cs
- HttpCacheVaryByContentEncodings.cs
- ClonableStack.cs
- UnsafeNativeMethodsMilCoreApi.cs
- CultureNotFoundException.cs
- CommandArguments.cs
- MetadataFile.cs
- ResourceSet.cs
- ImageCodecInfoPrivate.cs
- SqlCommandBuilder.cs
- BoundPropertyEntry.cs
- MarshalDirectiveException.cs
- connectionpool.cs
- DockPanel.cs
- Utils.cs
- SettingsPropertyIsReadOnlyException.cs
- HttpFileCollection.cs
- EncryptedPackageFilter.cs
- VarRemapper.cs
- QilFactory.cs
- MetadataSource.cs
- EndpointDispatcherTable.cs
- ReturnEventArgs.cs
- Table.cs
- SharedStatics.cs
- ErrorHandler.cs
- BlurEffect.cs
- WebPartManagerInternals.cs
- HttpInputStream.cs
- StorageBasedPackageProperties.cs
- ParagraphVisual.cs
- ScrollItemPatternIdentifiers.cs
- CodeSnippetExpression.cs
- MessageFilter.cs
- Behavior.cs
- TextRangeEdit.cs
- EdmProperty.cs
- TextSelectionHighlightLayer.cs
- XmlRawWriter.cs
- ColumnHeaderConverter.cs
- XmlObjectSerializerWriteContextComplexJson.cs
- SecurityKeyUsage.cs
- RequestCacheValidator.cs
- RoleManagerSection.cs
- Effect.cs
- AuthStoreRoleProvider.cs
- RegexBoyerMoore.cs
- TabControl.cs
- TabletDevice.cs
- FontSource.cs
- DocumentDesigner.cs
- TreeNodeBindingDepthConverter.cs