Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / Orcas / QFE / ndp / fx / src / DataEntity / System / Data / Metadata / CustomAssemblyResolver.cs / 1 / CustomAssemblyResolver.cs
//---------------------------------------------------------------------- //// Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] //--------------------------------------------------------------------- using System.Diagnostics; using System.Reflection; using System.Collections.Generic; using System.Data.Entity; namespace System.Data.Metadata.Edm { internal class CustomAssemblyResolver : MetadataArtifactAssemblyResolver { private Func_referenceResolver; private Func > _wildcardAssemblyEnumerator; internal CustomAssemblyResolver(Func > wildcardAssemblyEnumerator, Func referenceResolver) { Debug.Assert(wildcardAssemblyEnumerator != null); Debug.Assert(referenceResolver != null); _wildcardAssemblyEnumerator = wildcardAssemblyEnumerator; _referenceResolver = referenceResolver; } internal override bool TryResolveAssemblyReference(AssemblyName refernceName, out Assembly assembly) { assembly = _referenceResolver(refernceName); return assembly != null; } internal override IEnumerable GetWildcardAssemblies() { IEnumerable wildcardAssemblies = _wildcardAssemblyEnumerator(); if (wildcardAssemblies == null) { throw EntityUtil.InvalidOperation(Strings.WildcardEnumeratorReturnedNull); } return wildcardAssemblies; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //---------------------------------------------------------------------- // // Copyright (c) Microsoft Corporation. All rights reserved. // // // @owner [....] //--------------------------------------------------------------------- using System.Diagnostics; using System.Reflection; using System.Collections.Generic; using System.Data.Entity; namespace System.Data.Metadata.Edm { internal class CustomAssemblyResolver : MetadataArtifactAssemblyResolver { private Func_referenceResolver; private Func > _wildcardAssemblyEnumerator; internal CustomAssemblyResolver(Func > wildcardAssemblyEnumerator, Func referenceResolver) { Debug.Assert(wildcardAssemblyEnumerator != null); Debug.Assert(referenceResolver != null); _wildcardAssemblyEnumerator = wildcardAssemblyEnumerator; _referenceResolver = referenceResolver; } internal override bool TryResolveAssemblyReference(AssemblyName refernceName, out Assembly assembly) { assembly = _referenceResolver(refernceName); return assembly != null; } internal override IEnumerable GetWildcardAssemblies() { IEnumerable wildcardAssemblies = _wildcardAssemblyEnumerator(); if (wildcardAssemblies == null) { throw EntityUtil.InvalidOperation(Strings.WildcardEnumeratorReturnedNull); } return wildcardAssemblies; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- MLangCodePageEncoding.cs
- ExistsInCollection.cs
- CachedBitmap.cs
- fixedPageContentExtractor.cs
- AnnotationComponentManager.cs
- EdmScalarPropertyAttribute.cs
- DetailsViewCommandEventArgs.cs
- SimpleTextLine.cs
- DataContext.cs
- ObjectNavigationPropertyMapping.cs
- SystemUnicastIPAddressInformation.cs
- XmlElementList.cs
- IconHelper.cs
- EncoderReplacementFallback.cs
- rsa.cs
- UMPAttributes.cs
- ServiceProviders.cs
- NonSerializedAttribute.cs
- ScrollChrome.cs
- PropertyPathConverter.cs
- SQLConvert.cs
- ProcessRequestArgs.cs
- OleDbErrorCollection.cs
- ColumnWidthChangingEvent.cs
- CollectionConverter.cs
- EntityDescriptor.cs
- XmlAttributeOverrides.cs
- BitConverter.cs
- GrabHandleGlyph.cs
- CodeTypeOfExpression.cs
- ComplexTypeEmitter.cs
- UrlRoutingHandler.cs
- OutputCacheSection.cs
- Closure.cs
- WebPartCatalogCloseVerb.cs
- WindowsIdentity.cs
- ClientSession.cs
- XmlCDATASection.cs
- DesignerDataRelationship.cs
- CollectionChangedEventManager.cs
- StylusCaptureWithinProperty.cs
- CodeCommentStatement.cs
- NetCodeGroup.cs
- DataSourceXmlSerializer.cs
- DesignSurfaceManager.cs
- XmlDownloadManager.cs
- StylusLogic.cs
- ProgressBarRenderer.cs
- PropertyEmitter.cs
- Type.cs
- XPathBuilder.cs
- Serializer.cs
- CodeCompiler.cs
- ParameterToken.cs
- BinaryMethodMessage.cs
- _CommandStream.cs
- COM2TypeInfoProcessor.cs
- XsdSchemaFileEditor.cs
- DictionaryBase.cs
- HealthMonitoringSection.cs
- CodeTypeParameter.cs
- NameSpaceEvent.cs
- SourceItem.cs
- ExtendedPropertyDescriptor.cs
- ValidationPropertyAttribute.cs
- UserValidatedEventArgs.cs
- IResourceProvider.cs
- DataServiceExpressionVisitor.cs
- DetailsViewDesigner.cs
- TextSelectionProcessor.cs
- StatusBar.cs
- SafeLibraryHandle.cs
- ServerValidateEventArgs.cs
- AspProxy.cs
- SocketAddress.cs
- DayRenderEvent.cs
- FrameSecurityDescriptor.cs
- ProgressBar.cs
- AssemblyHelper.cs
- ErrorFormatter.cs
- TextPattern.cs
- SmiRequestExecutor.cs
- TaiwanLunisolarCalendar.cs
- DecimalAnimationUsingKeyFrames.cs
- RangeValuePattern.cs
- SecurityManager.cs
- securitycriticaldataClass.cs
- StateMachineWorkflowDesigner.cs
- EndpointBehaviorElement.cs
- XPathDocument.cs
- Propagator.cs
- WinEventWrap.cs
- HideDisabledControlAdapter.cs
- ConfigXmlDocument.cs
- ObjectIDGenerator.cs
- SubMenuStyleCollection.cs
- DefaultSerializationProviderAttribute.cs
- RootBuilder.cs
- GroupedContextMenuStrip.cs
- XPathPatternBuilder.cs