Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / wpf / src / Core / CSharp / MS / Internal / Resources / ContentFileHelper.cs / 1 / 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. // 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
- ListViewTableRow.cs
- StartUpEventArgs.cs
- WinInet.cs
- HelpInfo.cs
- activationcontext.cs
- XmlSerializerFactory.cs
- SynchronizedInputAdaptor.cs
- FragmentQueryKB.cs
- FixedHighlight.cs
- XmlILTrace.cs
- OleCmdHelper.cs
- CryptoStream.cs
- ProgressBarAutomationPeer.cs
- RequiredFieldValidator.cs
- ListViewItemSelectionChangedEvent.cs
- DataControlImageButton.cs
- XsdBuildProvider.cs
- LinearGradientBrush.cs
- HwndSource.cs
- AsyncCompletedEventArgs.cs
- DescriptionAttribute.cs
- ClientUriBehavior.cs
- IssuanceTokenProviderState.cs
- WebException.cs
- ExtendedPropertyCollection.cs
- UInt16Converter.cs
- ProfilePropertySettings.cs
- FormsAuthenticationModule.cs
- CompilerErrorCollection.cs
- XmlAnyElementAttribute.cs
- XmlDomTextWriter.cs
- WinFormsUtils.cs
- OdbcConnectionString.cs
- InlineObject.cs
- SHA384Managed.cs
- X509Chain.cs
- UserControlDocumentDesigner.cs
- XmlTextReaderImplHelpers.cs
- SerializableReadOnlyDictionary.cs
- GeneralTransformGroup.cs
- AssemblyResourceLoader.cs
- SmiRequestExecutor.cs
- CharKeyFrameCollection.cs
- ToolStripPanelRow.cs
- AssertFilter.cs
- DragCompletedEventArgs.cs
- WithParamAction.cs
- DecoderBestFitFallback.cs
- Reference.cs
- XmlRootAttribute.cs
- WorkflowDesignerColors.cs
- PerformanceCounter.cs
- DataBoundLiteralControl.cs
- ResourceAssociationSetEnd.cs
- BooleanKeyFrameCollection.cs
- XamlFilter.cs
- OperatingSystemVersionCheck.cs
- Pair.cs
- ScriptingSectionGroup.cs
- UnknownBitmapEncoder.cs
- CompositeFontFamily.cs
- IDReferencePropertyAttribute.cs
- WithParamAction.cs
- CaseInsensitiveHashCodeProvider.cs
- SHA256.cs
- ProfilePropertySettingsCollection.cs
- StatusBarItem.cs
- PersonalizationProviderHelper.cs
- DefaultCommandConverter.cs
- FrameworkRichTextComposition.cs
- OdbcEnvironment.cs
- GreenMethods.cs
- AliasedExpr.cs
- BorderGapMaskConverter.cs
- ValidationPropertyAttribute.cs
- ADMembershipUser.cs
- RowCache.cs
- _DigestClient.cs
- WmlCalendarAdapter.cs
- SurrogateEncoder.cs
- KeyValueConfigurationCollection.cs
- UpdatePanelControlTrigger.cs
- ArrayList.cs
- SafeNativeMethods.cs
- SamlAudienceRestrictionCondition.cs
- QuaternionConverter.cs
- WebBaseEventKeyComparer.cs
- MarkupCompilePass2.cs
- AdornerLayer.cs
- UInt64.cs
- EncryptedData.cs
- GestureRecognizer.cs
- MessageQueueConverter.cs
- ReceiveMessageAndVerifySecurityAsyncResultBase.cs
- ConfigurationLocation.cs
- SelectionService.cs
- TableProviderWrapper.cs
- DateRangeEvent.cs
- SqlStatistics.cs
- UrlMappingsModule.cs