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
- FastPropertyAccessor.cs
- SyntaxCheck.cs
- ValidatorUtils.cs
- IfAction.cs
- KeyPullup.cs
- ITextView.cs
- DataServiceResponse.cs
- DBNull.cs
- OdbcConnectionStringbuilder.cs
- CodeTypeConstructor.cs
- ComponentEditorPage.cs
- PixelFormats.cs
- SetStoryboardSpeedRatio.cs
- SafeThreadHandle.cs
- EditingScopeUndoUnit.cs
- Zone.cs
- DynamicPropertyHolder.cs
- ObjectNavigationPropertyMapping.cs
- SystemInformation.cs
- StateMachineWorkflowDesigner.cs
- ColorBuilder.cs
- EntityDataSourceValidationException.cs
- WinInet.cs
- XmlCustomFormatter.cs
- ProcessingInstructionAction.cs
- IDispatchConstantAttribute.cs
- FigureHelper.cs
- NotSupportedException.cs
- ObjectReaderCompiler.cs
- BrowserCapabilitiesCompiler.cs
- PrintEvent.cs
- DateTimeConverter.cs
- XamlParser.cs
- ModelPerspective.cs
- Material.cs
- PropertyItem.cs
- AtomParser.cs
- FixedPosition.cs
- ObjectConverter.cs
- ResourcePool.cs
- IImplicitResourceProvider.cs
- BitmapEffectOutputConnector.cs
- MatrixUtil.cs
- BCryptSafeHandles.cs
- RightsManagementInformation.cs
- CompilationLock.cs
- xamlnodes.cs
- WebPartVerb.cs
- XPathConvert.cs
- AddValidationError.cs
- VisualBrush.cs
- SystemIPGlobalProperties.cs
- SafeFindHandle.cs
- TrustLevel.cs
- DelegatingConfigHost.cs
- DecimalConverter.cs
- TypeLibConverter.cs
- DefaultClaimSet.cs
- DataGridLinkButton.cs
- WebCategoryAttribute.cs
- DispatcherExceptionEventArgs.cs
- ParenthesizePropertyNameAttribute.cs
- ClusterRegistryConfigurationProvider.cs
- ConsoleTraceListener.cs
- XmlSchemaAnnotation.cs
- SqlConnectionFactory.cs
- WizardForm.cs
- Guid.cs
- TypeReference.cs
- columnmapkeybuilder.cs
- CommandDevice.cs
- LocalizabilityAttribute.cs
- InputChannelAcceptor.cs
- DesignerActionKeyboardBehavior.cs
- StylusSystemGestureEventArgs.cs
- EntityDataReader.cs
- WindowsFont.cs
- PathStreamGeometryContext.cs
- IsolatedStorageFilePermission.cs
- TreeNodeStyle.cs
- HttpServerVarsCollection.cs
- Timer.cs
- SubclassTypeValidatorAttribute.cs
- StyleModeStack.cs
- SchemaComplexType.cs
- BitmapEffectOutputConnector.cs
- CodeDelegateInvokeExpression.cs
- CanonicalFontFamilyReference.cs
- ItemDragEvent.cs
- RightsManagementPermission.cs
- Ops.cs
- StorageSetMapping.cs
- SoapSchemaMember.cs
- ProviderSettingsCollection.cs
- HtmlInputRadioButton.cs
- Baml2006Reader.cs
- CapabilitiesRule.cs
- MediaPlayer.cs
- Helpers.cs
- DataSpaceManager.cs