Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / 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
- WebPermission.cs
- TypeInitializationException.cs
- RichTextBox.cs
- DigestTraceRecordHelper.cs
- ProtocolsSection.cs
- ProcessProtocolHandler.cs
- UnsafeNativeMethodsCLR.cs
- ViewCellRelation.cs
- CqlGenerator.cs
- ObjectStateFormatter.cs
- DbModificationCommandTree.cs
- HttpProfileBase.cs
- DataSvcMapFileSerializer.cs
- HtmlGenericControl.cs
- WindowInteropHelper.cs
- EventHandlingScope.cs
- SchemaElementDecl.cs
- CommentGlyph.cs
- PreviewKeyDownEventArgs.cs
- WsiProfilesElementCollection.cs
- GridViewColumnHeaderAutomationPeer.cs
- ConfigXmlWhitespace.cs
- SplineQuaternionKeyFrame.cs
- Roles.cs
- CqlParser.cs
- ToolStripGrip.cs
- UInt16Converter.cs
- WorkflowEnvironment.cs
- AutoGeneratedField.cs
- PeerToPeerException.cs
- ConfigurationManagerInternal.cs
- AttachmentCollection.cs
- XPathSelectionIterator.cs
- VBIdentifierTrimConverter.cs
- MultipleViewProviderWrapper.cs
- LightweightEntityWrapper.cs
- PointUtil.cs
- DateTimeConverter2.cs
- CodePrimitiveExpression.cs
- StringBuilder.cs
- XamlSerializerUtil.cs
- PropertyValueEditor.cs
- PropertyGridEditorPart.cs
- DiagnosticsElement.cs
- SvcFileManager.cs
- EditCommandColumn.cs
- PerformanceCounterPermission.cs
- HtmlEmptyTagControlBuilder.cs
- TemplateKeyConverter.cs
- MethodCallConverter.cs
- SettingsProperty.cs
- RegexMatchCollection.cs
- Lock.cs
- WebPartConnectionsCloseVerb.cs
- InnerItemCollectionView.cs
- OleDbEnumerator.cs
- CounterSample.cs
- SplineKeyFrames.cs
- _StreamFramer.cs
- AttachmentService.cs
- UInt64.cs
- SecurityElement.cs
- ObjectManager.cs
- BulletedList.cs
- BamlTreeNode.cs
- PersistenceTask.cs
- CharacterMetrics.cs
- SafeNativeMethods.cs
- StringUtil.cs
- CodeArgumentReferenceExpression.cs
- LogicalMethodInfo.cs
- ViewCellRelation.cs
- PolyBezierSegmentFigureLogic.cs
- VariableDesigner.xaml.cs
- PrintController.cs
- SymbolTable.cs
- DataBoundLiteralControl.cs
- Path.cs
- StandardTransformFactory.cs
- smtpconnection.cs
- UnionCqlBlock.cs
- XmlToDatasetMap.cs
- WebConfigurationFileMap.cs
- followingsibling.cs
- CodeNamespaceCollection.cs
- GifBitmapDecoder.cs
- SuppressMergeCheckAttribute.cs
- SecurityException.cs
- MsmqIntegrationAppDomainProtocolHandler.cs
- PerformanceCounter.cs
- SafeFileMappingHandle.cs
- MiniParameterInfo.cs
- AudioDeviceOut.cs
- SelectionGlyph.cs
- EventSetterHandlerConverter.cs
- GlyphTypeface.cs
- SchemaComplexType.cs
- EmptyReadOnlyDictionaryInternal.cs
- ConstructorNeedsTagAttribute.cs
- UriGenerator.cs