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
- CursorConverter.cs
- SqlReferenceCollection.cs
- ImageBrush.cs
- QuadraticBezierSegment.cs
- SafeNativeMethodsMilCoreApi.cs
- XmlChoiceIdentifierAttribute.cs
- ModulesEntry.cs
- GetIsBrowserClientRequest.cs
- DataGridViewCell.cs
- XmlStreamedByteStreamReader.cs
- RelationshipNavigation.cs
- RecognitionEventArgs.cs
- Item.cs
- XamlFxTrace.cs
- SecurityTokenException.cs
- Debugger.cs
- StringCollection.cs
- CredentialCache.cs
- XmlArrayAttribute.cs
- RevocationPoint.cs
- NameNode.cs
- Empty.cs
- OdbcTransaction.cs
- LazyTextWriterCreator.cs
- PointLight.cs
- BufferModesCollection.cs
- TextLine.cs
- NamespaceList.cs
- iisPickupDirectory.cs
- InkCanvasAutomationPeer.cs
- VoiceInfo.cs
- DataKeyArray.cs
- ListView.cs
- AdornerLayer.cs
- Main.cs
- TypeNameConverter.cs
- ToolStripMenuItemCodeDomSerializer.cs
- SqlTypeConverter.cs
- Sorting.cs
- BinaryUtilClasses.cs
- WizardPanelChangingEventArgs.cs
- StubHelpers.cs
- Label.cs
- BitHelper.cs
- CfgParser.cs
- ScriptReferenceBase.cs
- OleDbRowUpdatedEvent.cs
- ImageBrush.cs
- XmlAnyElementAttributes.cs
- XmlSortKey.cs
- HttpResponseHeader.cs
- XmlNullResolver.cs
- DefaultBinder.cs
- KeyEvent.cs
- GroupBoxAutomationPeer.cs
- PrintDialog.cs
- WorkerRequest.cs
- _ListenerAsyncResult.cs
- TypeBuilderInstantiation.cs
- FixedTextSelectionProcessor.cs
- ImageMapEventArgs.cs
- ConfigurationStrings.cs
- JsonStringDataContract.cs
- InteropBitmapSource.cs
- SystemInfo.cs
- SqlNodeAnnotation.cs
- VerificationAttribute.cs
- EncodingDataItem.cs
- RectAnimationUsingKeyFrames.cs
- HeaderCollection.cs
- DefaultValueMapping.cs
- MarshalDirectiveException.cs
- IfJoinedCondition.cs
- ApplicationManager.cs
- __Filters.cs
- MsmqTransportReceiveParameters.cs
- ListViewDeletedEventArgs.cs
- ProcessExitedException.cs
- ContextBase.cs
- EncryptedPackage.cs
- XmlNotation.cs
- BindingNavigator.cs
- DataGridViewCellMouseEventArgs.cs
- PageWrapper.cs
- NetSectionGroup.cs
- ToolboxItemCollection.cs
- HijriCalendar.cs
- _SslSessionsCache.cs
- InternalConfigEventArgs.cs
- NamedPipeHostedTransportConfiguration.cs
- DbException.cs
- AppDomainProtocolHandler.cs
- ContextInformation.cs
- BordersPage.cs
- PerfService.cs
- ReadOnlyMetadataCollection.cs
- UnsafeNativeMethodsPenimc.cs
- TableRowGroup.cs
- ObjectDataSourceFilteringEventArgs.cs
- DbSource.cs