Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / wpf / src / Core / CSharp / MS / Internal / Resources / ContentFileHelper.cs / 1305600 / 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
- CodeTryCatchFinallyStatement.cs
- TextRunCacheImp.cs
- MessageHeaderDescription.cs
- TimeoutHelper.cs
- ActivityMarkupSerializationProvider.cs
- RelatedPropertyManager.cs
- MostlySingletonList.cs
- SspiHelper.cs
- InheritanceRules.cs
- AggregateException.cs
- WhileDesigner.cs
- ComplexPropertyEntry.cs
- CheckBox.cs
- FtpWebRequest.cs
- StreamAsIStream.cs
- ModifyActivitiesPropertyDescriptor.cs
- ObjectHelper.cs
- StateDesigner.Helpers.cs
- QueryInterceptorAttribute.cs
- PhysicalFontFamily.cs
- ClosableStream.cs
- ScriptReferenceBase.cs
- ManagementObject.cs
- DataRecord.cs
- WebPartDescriptionCollection.cs
- ConnectionPoint.cs
- WebExceptionStatus.cs
- BaseEntityWrapper.cs
- CryptographicAttribute.cs
- StringResourceManager.cs
- ThousandthOfEmRealDoubles.cs
- TimeManager.cs
- SystemKeyConverter.cs
- EndpointFilterProvider.cs
- OrderByQueryOptionExpression.cs
- HTTPNotFoundHandler.cs
- ElementAction.cs
- Visual.cs
- MemberAccessException.cs
- FullTrustAssemblyCollection.cs
- OleDbDataReader.cs
- AssemblyLoader.cs
- UIElementCollection.cs
- ApplicationInfo.cs
- ImportDesigner.xaml.cs
- TextElementEditingBehaviorAttribute.cs
- ObjectDataSourceEventArgs.cs
- DataGridViewHitTestInfo.cs
- PolyBezierSegmentFigureLogic.cs
- ArraySubsetEnumerator.cs
- PointValueSerializer.cs
- CryptoConfig.cs
- ConfigurationPropertyAttribute.cs
- EntityDesignerUtils.cs
- XPathChildIterator.cs
- WindowsGrip.cs
- WaitingCursor.cs
- RestClientProxyHandler.cs
- EdgeModeValidation.cs
- OperationAbortedException.cs
- BitVec.cs
- MimeTypeMapper.cs
- MouseGestureValueSerializer.cs
- StreamUpdate.cs
- JsonWriter.cs
- SurrogateEncoder.cs
- TabletDevice.cs
- SemaphoreFullException.cs
- Configuration.cs
- IntegerValidator.cs
- TreeNodeStyleCollection.cs
- WSHttpSecurity.cs
- FtpWebResponse.cs
- XmlTextEncoder.cs
- SHA256Managed.cs
- XmlSerializationReader.cs
- TraceEventCache.cs
- SoapRpcServiceAttribute.cs
- M3DUtil.cs
- ZipIOLocalFileHeader.cs
- PasswordBoxAutomationPeer.cs
- UnsafePeerToPeerMethods.cs
- CalendarDayButton.cs
- InvalidateEvent.cs
- CommonRemoteMemoryBlock.cs
- MemoryRecordBuffer.cs
- StorageAssociationTypeMapping.cs
- PickDesigner.xaml.cs
- UidManager.cs
- ClientBuildManagerCallback.cs
- SmtpCommands.cs
- RelationshipEndCollection.cs
- UniqueIdentifierService.cs
- DataFormat.cs
- HttpHandlersSection.cs
- SecurityContextSecurityToken.cs
- RealProxy.cs
- TimeSpanFormat.cs
- RecipientInfo.cs
- XPathBinder.cs