Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / MS / Internal / Resources / ContentFileHelper.cs / 1305600 / 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
- EdmToObjectNamespaceMap.cs
- WsdlEndpointConversionContext.cs
- XmlException.cs
- ListViewVirtualItemsSelectionRangeChangedEvent.cs
- OdbcConnectionFactory.cs
- webeventbuffer.cs
- DispatcherHookEventArgs.cs
- Avt.cs
- ImagingCache.cs
- StoryFragments.cs
- StickyNote.cs
- ContentTextAutomationPeer.cs
- WindowsGraphicsCacheManager.cs
- XmlTextAttribute.cs
- PopupRootAutomationPeer.cs
- TargetException.cs
- ProviderSettingsCollection.cs
- TargetPerspective.cs
- FunctionUpdateCommand.cs
- KeyValueSerializer.cs
- XmlStreamNodeWriter.cs
- CriticalHandle.cs
- RemotingConfigParser.cs
- Menu.cs
- GlobalizationSection.cs
- filewebresponse.cs
- NativeRightsManagementAPIsStructures.cs
- Bold.cs
- SqlDataSourceStatusEventArgs.cs
- BindableTemplateBuilder.cs
- AppearanceEditorPart.cs
- IdentifierElement.cs
- TextElementEnumerator.cs
- TypedReference.cs
- sortedlist.cs
- OrderingQueryOperator.cs
- ConnectionManager.cs
- SystemIPGlobalProperties.cs
- StateChangeEvent.cs
- IDQuery.cs
- SqlDataSourceView.cs
- ConfigurationErrorsException.cs
- DropSource.cs
- FontSource.cs
- QuaternionConverter.cs
- Random.cs
- RuntimeConfigLKG.cs
- FlowDocumentReaderAutomationPeer.cs
- SafeMemoryMappedFileHandle.cs
- DataSet.cs
- GroupStyle.cs
- CollectionConverter.cs
- OlePropertyStructs.cs
- HttpRawResponse.cs
- ZipIOLocalFileBlock.cs
- XmlDataSourceView.cs
- BrushValueSerializer.cs
- WebPartsPersonalizationAuthorization.cs
- DataGridViewColumn.cs
- Point4D.cs
- XamlFilter.cs
- SmtpNtlmAuthenticationModule.cs
- VariableQuery.cs
- NotificationContext.cs
- ZeroOpNode.cs
- EntityDataSourceDataSelection.cs
- UrlAuthorizationModule.cs
- LayoutUtils.cs
- TraceSection.cs
- TextTreeUndoUnit.cs
- FileEnumerator.cs
- securitymgrsite.cs
- SelfIssuedTokenFactoryCredential.cs
- HostnameComparisonMode.cs
- FloaterParaClient.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- OracleDataReader.cs
- ConsoleTraceListener.cs
- TableLayoutPanelCodeDomSerializer.cs
- MediaEntryAttribute.cs
- DataGridViewCellParsingEventArgs.cs
- PropertyRef.cs
- Comparer.cs
- ObsoleteAttribute.cs
- SemaphoreFullException.cs
- NameNode.cs
- StructuredTypeEmitter.cs
- CustomAttribute.cs
- DataGridAutoFormatDialog.cs
- DivideByZeroException.cs
- BasicCommandTreeVisitor.cs
- CalendarDateChangedEventArgs.cs
- FtpWebRequest.cs
- CodeIdentifiers.cs
- ModuleElement.cs
- DataStreams.cs
- GroupBox.cs
- TypeDelegator.cs
- XmlSchemaFacet.cs
- SyncMethodInvoker.cs