Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Core / MS / Internal / Resources / ContentFileHelper.cs / 2 / 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
- RoamingStoreFile.cs
- XamlInt32CollectionSerializer.cs
- DataTableClearEvent.cs
- StylusDownEventArgs.cs
- NameObjectCollectionBase.cs
- ISO2022Encoding.cs
- CodeExpressionCollection.cs
- ServicePointManagerElement.cs
- NumberFormatInfo.cs
- TracedNativeMethods.cs
- ProgramPublisher.cs
- DesignerDataTableBase.cs
- CryptoHelper.cs
- StrongTypingException.cs
- Menu.cs
- PackUriHelper.cs
- XmlNodeChangedEventArgs.cs
- ChangeNode.cs
- WindowsAuthenticationEventArgs.cs
- GiveFeedbackEventArgs.cs
- PublishLicense.cs
- Component.cs
- PeerHelpers.cs
- SimpleApplicationHost.cs
- SplitContainer.cs
- ManualResetEvent.cs
- SimpleBitVector32.cs
- SystemColors.cs
- PersonalizationAdministration.cs
- ProgressBarAutomationPeer.cs
- ContentHostHelper.cs
- TdsParserHelperClasses.cs
- DataGridViewButtonColumn.cs
- DrawingContext.cs
- ListBindingHelper.cs
- MetadataFile.cs
- XamlSerializerUtil.cs
- OleDbSchemaGuid.cs
- DependencyObjectPropertyDescriptor.cs
- MenuItemBinding.cs
- TextureBrush.cs
- DataServiceContext.cs
- SchemaRegistration.cs
- NativeMethods.cs
- StdRegProviderWrapper.cs
- ListContractAdapter.cs
- ToolStripDropDownClosingEventArgs.cs
- ListDictionary.cs
- XamlVector3DCollectionSerializer.cs
- DataBindingCollection.cs
- Message.cs
- DispatcherProcessingDisabled.cs
- DefaultMemberAttribute.cs
- Point.cs
- NamespaceEmitter.cs
- DateTimeSerializationSection.cs
- Point3D.cs
- ImmutableObjectAttribute.cs
- TableLayoutPanel.cs
- ContentHostHelper.cs
- MemberPath.cs
- WebScriptEnablingBehavior.cs
- PropertyPathWorker.cs
- WindowsButton.cs
- Clock.cs
- DesignTimeDataBinding.cs
- querybuilder.cs
- WebServiceFaultDesigner.cs
- Stylesheet.cs
- SchemaInfo.cs
- Timeline.cs
- RoleServiceManager.cs
- ServicePointManager.cs
- XmlNotation.cs
- NamespaceInfo.cs
- WindowsHyperlink.cs
- EntityConnectionStringBuilder.cs
- TrackPoint.cs
- DataSourceView.cs
- RemoveStoryboard.cs
- InstancePersistenceCommand.cs
- GridSplitterAutomationPeer.cs
- BinaryFormatterWriter.cs
- BCLDebug.cs
- CalendarDayButton.cs
- FontFamilyConverter.cs
- ProviderCollection.cs
- QueryCoreOp.cs
- ChoiceConverter.cs
- RightsManagementPermission.cs
- DirectoryLocalQuery.cs
- PrintEvent.cs
- TextModifier.cs
- NamespaceList.cs
- OutputCacheModule.cs
- SoapFormatter.cs
- ZipIOCentralDirectoryFileHeader.cs
- AuthenticationManager.cs
- InstalledFontCollection.cs
- FixedMaxHeap.cs