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
- DocumentCollection.cs
- ColumnMapCopier.cs
- ToolStripRendererSwitcher.cs
- lengthconverter.cs
- TreeWalker.cs
- ExtensionWindowResizeGrip.cs
- BufferedGraphics.cs
- MapPathBasedVirtualPathProvider.cs
- InitializationEventAttribute.cs
- ObjectAssociationEndMapping.cs
- AssemblyBuilderData.cs
- XsltQilFactory.cs
- SHA256CryptoServiceProvider.cs
- TextBoxView.cs
- StreamReader.cs
- SlotInfo.cs
- QilStrConcat.cs
- ExclusiveCanonicalizationTransform.cs
- AvTrace.cs
- EndpointIdentityExtension.cs
- SkewTransform.cs
- FacetDescription.cs
- DataGridColumnDropSeparator.cs
- ProgressBarAutomationPeer.cs
- DataBoundLiteralControl.cs
- NavigatorOutput.cs
- WorkerRequest.cs
- CodeDirectoryCompiler.cs
- XPathSelfQuery.cs
- TextContainerHelper.cs
- EntityParameter.cs
- ToolTipAutomationPeer.cs
- FillErrorEventArgs.cs
- CardSpaceSelector.cs
- SmtpClient.cs
- FormViewInsertedEventArgs.cs
- NamespaceList.cs
- HttpContextBase.cs
- ProfileService.cs
- SystemIPv4InterfaceProperties.cs
- CompensateDesigner.cs
- Selector.cs
- BitStack.cs
- ToolStripItemClickedEventArgs.cs
- XmlDeclaration.cs
- ReadOnlyCollection.cs
- CurrentChangedEventManager.cs
- SaveFileDialog.cs
- DeflateStreamAsyncResult.cs
- ComplexTypeEmitter.cs
- Error.cs
- Vertex.cs
- TextRange.cs
- SafeLibraryHandle.cs
- TextWriter.cs
- TextTreeDeleteContentUndoUnit.cs
- UpDownBase.cs
- GenericsNotImplementedException.cs
- SymLanguageVendor.cs
- CookieHandler.cs
- ActiveXHost.cs
- CssTextWriter.cs
- HttpResponseMessageProperty.cs
- MarshalByValueComponent.cs
- SchemaElement.cs
- WebErrorHandler.cs
- WebExceptionStatus.cs
- AppendHelper.cs
- DecoratedNameAttribute.cs
- XmlChildEnumerator.cs
- CheckBoxList.cs
- SqlDataReaderSmi.cs
- DigitShape.cs
- TextServicesContext.cs
- VectorConverter.cs
- DbModificationClause.cs
- CodeTypeReferenceExpression.cs
- NameSpaceExtractor.cs
- StringUtil.cs
- ApplicationHost.cs
- DbModificationClause.cs
- Point3D.cs
- SourceLocation.cs
- BamlVersionHeader.cs
- DataGridViewCellStateChangedEventArgs.cs
- JsonXmlDataContract.cs
- XPathNodeInfoAtom.cs
- FillRuleValidation.cs
- XsltOutput.cs
- ImageListStreamer.cs
- EventLogPermissionAttribute.cs
- MappingModelBuildProvider.cs
- ParameterBuilder.cs
- PageContentAsyncResult.cs
- DocumentAutomationPeer.cs
- DataGridViewRowConverter.cs
- SolidColorBrush.cs
- OrthographicCamera.cs
- UserPreferenceChangedEventArgs.cs
- Itemizer.cs