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
- BinaryObjectReader.cs
- MetadataArtifactLoaderCompositeResource.cs
- ReadOnlyDictionary.cs
- PrinterResolution.cs
- LinkedResource.cs
- IIS7WorkerRequest.cs
- CqlWriter.cs
- DispatcherExceptionEventArgs.cs
- SessionStateModule.cs
- InvokeMethod.cs
- CustomErrorsSection.cs
- ToolboxBitmapAttribute.cs
- ButtonChrome.cs
- EventItfInfo.cs
- WebServiceResponseDesigner.cs
- ValueConversionAttribute.cs
- SplitContainer.cs
- CodeNamespaceCollection.cs
- DiscreteKeyFrames.cs
- EventSinkActivity.cs
- SimpleHandlerBuildProvider.cs
- DataServiceProcessingPipelineEventArgs.cs
- EntityContainer.cs
- Int32CAMarshaler.cs
- NetworkInformationException.cs
- ImageIndexEditor.cs
- HttpContextWrapper.cs
- NotifyIcon.cs
- ExpanderAutomationPeer.cs
- CqlParser.cs
- DefaultCompensation.cs
- SessionEndingEventArgs.cs
- AtomEntry.cs
- Thumb.cs
- returneventsaver.cs
- WebPartEditorApplyVerb.cs
- ShapingEngine.cs
- IndexOutOfRangeException.cs
- OutputWindow.cs
- HtmlShimManager.cs
- ExtensionDataObject.cs
- NamedPipeTransportElement.cs
- FrameworkRichTextComposition.cs
- TextSchema.cs
- SourceInterpreter.cs
- URLMembershipCondition.cs
- FormatterConverter.cs
- TextEffectResolver.cs
- _LocalDataStore.cs
- SuppressMergeCheckAttribute.cs
- DesignerActionKeyboardBehavior.cs
- XmlSchemaAll.cs
- VirtualPathProvider.cs
- SchemaName.cs
- CodeAttributeDeclarationCollection.cs
- GuidelineSet.cs
- ListChangedEventArgs.cs
- QilChoice.cs
- TreeViewCancelEvent.cs
- SamlAudienceRestrictionCondition.cs
- GeneralTransform2DTo3D.cs
- InstanceDataCollection.cs
- SerialErrors.cs
- ApplicationSecurityInfo.cs
- WebPartCatalogCloseVerb.cs
- XamlPoint3DCollectionSerializer.cs
- AdvancedBindingPropertyDescriptor.cs
- TextTreeUndoUnit.cs
- SynchronizationContext.cs
- StateInitialization.cs
- PerformanceCountersBase.cs
- HandlerFactoryCache.cs
- TableCellCollection.cs
- ClaimComparer.cs
- SqlDataSourceFilteringEventArgs.cs
- FileSystemWatcher.cs
- ExpressionPrefixAttribute.cs
- WindowsFormsSectionHandler.cs
- WorkflowShape.cs
- FileIOPermission.cs
- IssuanceTokenProviderState.cs
- XmlWellformedWriter.cs
- StorageEntityTypeMapping.cs
- RadioButtonRenderer.cs
- XmlKeywords.cs
- TextLineBreak.cs
- SecureConversationDriver.cs
- SAPICategories.cs
- SiteMapNode.cs
- PropertyChangedEventArgs.cs
- HttpWrapper.cs
- TransactionScope.cs
- ClientScriptItemCollection.cs
- PerformanceCounterPermissionEntryCollection.cs
- ZipPackage.cs
- ProtectedConfiguration.cs
- X509WindowsSecurityToken.cs
- FixedDSBuilder.cs
- FilteredXmlReader.cs
- ToolBarButton.cs