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
- TypedTableHandler.cs
- ProcessInputEventArgs.cs
- BuildProviderUtils.cs
- followingsibling.cs
- CryptoProvider.cs
- WebServiceHandler.cs
- AppDomainUnloadedException.cs
- ExpressionConverter.cs
- TagPrefixCollection.cs
- ListView.cs
- ResourceProviderFactory.cs
- ReadOnlyHierarchicalDataSourceView.cs
- ResolveDuplexAsyncResult.cs
- StandardTransformFactory.cs
- _SecureChannel.cs
- util.cs
- KnownColorTable.cs
- FrameAutomationPeer.cs
- NavigatingCancelEventArgs.cs
- DataListItemCollection.cs
- KnowledgeBase.cs
- AppModelKnownContentFactory.cs
- ContextQuery.cs
- Camera.cs
- ProcessInfo.cs
- DbConnectionPoolGroup.cs
- XomlCompilerResults.cs
- VariableQuery.cs
- HtmlTextArea.cs
- DBConcurrencyException.cs
- ObjectDataSourceMethodEventArgs.cs
- HostExecutionContextManager.cs
- DataContractSet.cs
- _FtpDataStream.cs
- HttpRuntimeSection.cs
- MenuItemStyleCollectionEditor.cs
- DrawingServices.cs
- ConstructorNeedsTagAttribute.cs
- SafeFindHandle.cs
- DataGridRowHeaderAutomationPeer.cs
- DBSchemaRow.cs
- DataGridLinkButton.cs
- BaseValidatorDesigner.cs
- ZipFileInfo.cs
- EventLogEntry.cs
- SchemaNames.cs
- GenericAuthenticationEventArgs.cs
- MissingFieldException.cs
- RSAOAEPKeyExchangeFormatter.cs
- SqlOuterApplyReducer.cs
- XPathChildIterator.cs
- XmlNodeList.cs
- InputBinding.cs
- StatusBarDrawItemEvent.cs
- CopyCodeAction.cs
- GridViewDeletedEventArgs.cs
- EnumerableCollectionView.cs
- NavigateEvent.cs
- COM2IVsPerPropertyBrowsingHandler.cs
- SpeechEvent.cs
- PrinterResolution.cs
- IgnoreFileBuildProvider.cs
- AssemblyBuilder.cs
- DialogResultConverter.cs
- XmlUrlResolver.cs
- DrawingBrush.cs
- ProfileGroupSettingsCollection.cs
- AdornedElementPlaceholder.cs
- PrimaryKeyTypeConverter.cs
- SqlNodeAnnotations.cs
- DataServiceHostFactory.cs
- SignerInfo.cs
- WindowsTokenRoleProvider.cs
- ElementMarkupObject.cs
- DrawingContextFlattener.cs
- ColumnMapVisitor.cs
- Size.cs
- AttachedPropertyBrowsableAttribute.cs
- QilTargetType.cs
- NamespaceEmitter.cs
- Span.cs
- Material.cs
- BamlStream.cs
- CharEntityEncoderFallback.cs
- CompiledQueryCacheKey.cs
- ConfigUtil.cs
- ProfilePropertyMetadata.cs
- CodeLinePragma.cs
- UserControl.cs
- TypeNameParser.cs
- Rijndael.cs
- Char.cs
- SecurityContextSecurityToken.cs
- FileSystemEventArgs.cs
- TypeElement.cs
- CqlLexerHelpers.cs
- ISAPIRuntime.cs
- ReaderContextStackData.cs
- MessageSecurityException.cs
- ConfigXmlCDataSection.cs