Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- CacheVirtualItemsEvent.cs
- StringAnimationBase.cs
- IERequestCache.cs
- SafePipeHandle.cs
- X509CertificateValidationMode.cs
- SoapInteropTypes.cs
- SmiContextFactory.cs
- XmlUtf8RawTextWriter.cs
- SecureEnvironment.cs
- GradientBrush.cs
- FocusManager.cs
- HttpWebRequestElement.cs
- HostedTransportConfigurationBase.cs
- SpecialFolderEnumConverter.cs
- DecoderFallbackWithFailureFlag.cs
- OutputCacheProfileCollection.cs
- InvalidProgramException.cs
- coordinatorscratchpad.cs
- ItemContainerPattern.cs
- SqlVersion.cs
- Font.cs
- InputLanguageManager.cs
- SerTrace.cs
- SignatureSummaryDialog.cs
- InteropAutomationProvider.cs
- ViewManager.cs
- CodePageUtils.cs
- __ConsoleStream.cs
- ScrollChangedEventArgs.cs
- ConcurrentStack.cs
- CryptoKeySecurity.cs
- ToolBarPanel.cs
- bidPrivateBase.cs
- SmiGettersStream.cs
- TreeSet.cs
- WindowsProgressbar.cs
- ServicePointManager.cs
- SqlDataSourceSelectingEventArgs.cs
- XmlSchemaAny.cs
- DialogWindow.cs
- RegexCompilationInfo.cs
- PipelineModuleStepContainer.cs
- SharedStatics.cs
- BrowserDefinitionCollection.cs
- SequentialOutput.cs
- XmlNode.cs
- CollectionsUtil.cs
- SchemaInfo.cs
- PasswordRecovery.cs
- VisualTreeUtils.cs
- EncryptedType.cs
- WebPartHeaderCloseVerb.cs
- TransactionFilter.cs
- XmlSchemaSimpleTypeList.cs
- XmlWellformedWriter.cs
- SymmetricAlgorithm.cs
- ExceptionCollection.cs
- AutomationElement.cs
- BrowserCapabilitiesCompiler.cs
- ResourceReader.cs
- RichTextBoxConstants.cs
- basenumberconverter.cs
- EmissiveMaterial.cs
- MobileListItem.cs
- ThreadExceptionEvent.cs
- RetrieveVirtualItemEventArgs.cs
- FrugalMap.cs
- Int32CAMarshaler.cs
- ControlCachePolicy.cs
- RequiredFieldValidator.cs
- SplineKeyFrames.cs
- BinaryParser.cs
- DbConnectionPoolGroup.cs
- TextAction.cs
- XhtmlTextWriter.cs
- CrossSiteScriptingValidation.cs
- Roles.cs
- InProcStateClientManager.cs
- DocumentApplicationJournalEntry.cs
- PerformanceCounterPermissionAttribute.cs
- XmlIlVisitor.cs
- XmlSignificantWhitespace.cs
- safex509handles.cs
- TextRenderer.cs
- XmlReaderSettings.cs
- PeerToPeerException.cs
- ParameterRefs.cs
- EventLogEntry.cs
- SchemaElementDecl.cs
- LinqTreeNodeEvaluator.cs
- ExpressionBinding.cs
- Util.cs
- NumberAction.cs
- SqlCrossApplyToCrossJoin.cs
- ImageSourceValueSerializer.cs
- ListBox.cs
- LambdaExpression.cs
- AggregatePushdown.cs
- RelatedView.cs
- AsmxEndpointPickerExtension.cs