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
- AppDomainUnloadedException.cs
- RequestTimeoutManager.cs
- sortedlist.cs
- TextWriterTraceListener.cs
- TagPrefixAttribute.cs
- DeclarativeCatalogPart.cs
- TemplateField.cs
- DesignerInterfaces.cs
- SimpleBitVector32.cs
- ListViewItemSelectionChangedEvent.cs
- DbModificationClause.cs
- DynamicUpdateCommand.cs
- InvokeGenerator.cs
- ConfigurationSchemaErrors.cs
- HttpStaticObjectsCollectionWrapper.cs
- ChtmlCommandAdapter.cs
- Graph.cs
- QilName.cs
- NotificationContext.cs
- HostProtectionException.cs
- DbExpressionVisitor_TResultType.cs
- CompareValidator.cs
- CompilerTypeWithParams.cs
- FolderNameEditor.cs
- Debug.cs
- QilScopedVisitor.cs
- AsymmetricKeyExchangeDeformatter.cs
- EventManager.cs
- QilPatternFactory.cs
- ColumnMapProcessor.cs
- ConsumerConnectionPointCollection.cs
- GZipObjectSerializer.cs
- TransactionInterop.cs
- PermissionSetTriple.cs
- PanelStyle.cs
- XmlDataDocument.cs
- Internal.cs
- DataColumn.cs
- SessionState.cs
- SessionParameter.cs
- EditorServiceContext.cs
- TablePatternIdentifiers.cs
- DrawingImage.cs
- RepeaterItem.cs
- _KerberosClient.cs
- TimeSpanFormat.cs
- CallbackHandler.cs
- RowBinding.cs
- AuthenticationModuleElementCollection.cs
- RegexNode.cs
- DbConnectionHelper.cs
- BindingValueChangedEventArgs.cs
- CacheSection.cs
- ToolStripDropDownClosedEventArgs.cs
- UidPropertyAttribute.cs
- HandoffBehavior.cs
- documentsequencetextpointer.cs
- Cursors.cs
- JsonObjectDataContract.cs
- DocumentReferenceCollection.cs
- ConfigurationErrorsException.cs
- ClientBuildManager.cs
- XmlIncludeAttribute.cs
- MemoryStream.cs
- DragDrop.cs
- NegatedCellConstant.cs
- ObjectTag.cs
- Nullable.cs
- DataGridColumnHeaderItemAutomationPeer.cs
- NamespaceQuery.cs
- SizeFConverter.cs
- ItemCollection.cs
- CodeDomConfigurationHandler.cs
- TemplatePropertyEntry.cs
- TreeNodeConverter.cs
- ImportCatalogPart.cs
- CoreChannel.cs
- EmptyStringExpandableObjectConverter.cs
- IISMapPath.cs
- MenuItemBinding.cs
- Literal.cs
- XmlAnyElementAttribute.cs
- CodeDirectoryCompiler.cs
- PropertyValueChangedEvent.cs
- Site.cs
- SwitchCase.cs
- WindowsEditBox.cs
- SourceFileBuildProvider.cs
- RegexTree.cs
- XmlTextWriter.cs
- NamespaceTable.cs
- EventToken.cs
- SQLMoneyStorage.cs
- MiniCustomAttributeInfo.cs
- EventRouteFactory.cs
- XmlElementList.cs
- PointUtil.cs
- PackUriHelper.cs
- Schema.cs
- XPathNodePointer.cs