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
- DataGridCell.cs
- ToolStripSplitStackLayout.cs
- WindowsTab.cs
- ArglessEventHandlerProxy.cs
- PageContentAsyncResult.cs
- httpapplicationstate.cs
- Empty.cs
- DefaultTraceListener.cs
- ClockController.cs
- WebBrowserNavigatingEventHandler.cs
- HeaderUtility.cs
- LicenseProviderAttribute.cs
- SocketPermission.cs
- TypeValidationEventArgs.cs
- WorkflowServiceNamespace.cs
- ProcessHostFactoryHelper.cs
- CodePropertyReferenceExpression.cs
- ComboBoxRenderer.cs
- IsolatedStorageFilePermission.cs
- ApplicationTrust.cs
- FunctionQuery.cs
- CodeSpit.cs
- GlyphsSerializer.cs
- HttpModuleActionCollection.cs
- BamlBinaryWriter.cs
- ISAPIRuntime.cs
- XmlUtil.cs
- SerializationEventsCache.cs
- ModuleBuilderData.cs
- MenuItemBindingCollection.cs
- PolicyLevel.cs
- CapabilitiesAssignment.cs
- ReadOnlyHierarchicalDataSourceView.cs
- OdbcConnectionString.cs
- ISAPIApplicationHost.cs
- StackBuilderSink.cs
- Compiler.cs
- GeneralTransform.cs
- UrlMappingCollection.cs
- BinHexDecoder.cs
- Facet.cs
- SqlConnectionString.cs
- PolyQuadraticBezierSegmentFigureLogic.cs
- AnonymousIdentificationModule.cs
- SoapAttributeAttribute.cs
- WorkflowInvoker.cs
- MediaTimeline.cs
- DesignerDataSourceView.cs
- RegexStringValidator.cs
- TrustLevel.cs
- SqlCaseSimplifier.cs
- CombinedGeometry.cs
- HttpDebugHandler.cs
- PropertyInformation.cs
- SchemaCollectionCompiler.cs
- XmlReturnWriter.cs
- XmlSchemaSubstitutionGroup.cs
- ExceptionNotification.cs
- httpstaticobjectscollection.cs
- FontWeights.cs
- ApplicationFileCodeDomTreeGenerator.cs
- ProfilePropertySettingsCollection.cs
- SqlFormatter.cs
- SslStreamSecurityBindingElement.cs
- TransformGroup.cs
- BinaryParser.cs
- DefaultSerializationProviderAttribute.cs
- RuntimeWrappedException.cs
- Exceptions.cs
- InvokePatternIdentifiers.cs
- StrokeCollection2.cs
- MethodSignatureGenerator.cs
- HtmlLinkAdapter.cs
- MappingItemCollection.cs
- MappedMetaModel.cs
- SqlWriter.cs
- StringFunctions.cs
- RuleSettings.cs
- WebBrowserUriTypeConverter.cs
- RightsManagementEncryptionTransform.cs
- DrawListViewSubItemEventArgs.cs
- SystemIcmpV4Statistics.cs
- Classification.cs
- TabOrder.cs
- login.cs
- Style.cs
- wpf-etw.cs
- ObjectDataSource.cs
- ServiceRouteHandler.cs
- SystemColors.cs
- HttpServerVarsCollection.cs
- DrawingContext.cs
- PixelFormatConverter.cs
- VerificationAttribute.cs
- ACE.cs
- IApplicationTrustManager.cs
- SafeEventLogWriteHandle.cs
- XmlSiteMapProvider.cs
- FamilyTypefaceCollection.cs
- NodeFunctions.cs