DataProviderObjectFactory.GetAssembly Method
Resolves a provider-specific assembly string to its corresponding Assembly representation.
Namespace: Microsoft.VisualStudio.Data.Framework
Assembly: Microsoft.VisualStudio.Data.Framework (in Microsoft.VisualStudio.Data.Framework.dll)
Syntax
‘선언
Public Overridable Function GetAssembly ( _
assemblyString As String _
) As Assembly
public virtual Assembly GetAssembly(
string assemblyString
)
public:
virtual Assembly^ GetAssembly(
String^ assemblyString
)
abstract GetAssembly :
assemblyString:string -> Assembly
override GetAssembly :
assemblyString:string -> Assembly
public function GetAssembly(
assemblyString : String
) : Assembly
Parameters
- assemblyString
Type: System.String
A provider-specific assembly string.
Return Value
Type: System.Reflection.Assembly
An Assembly object representing the assembly resolved from the specified assembly string, if found; otherwise, nulla null reference (Nothing in Visual Basic).
Implements
IVsDataProviderObjectFactory.GetAssembly(String)
Exceptions
Exception | Condition |
---|---|
ArgumentNullException | The assemblyString parameter is nulla null reference (Nothing in Visual Basic). |
Remarks
This method is useful when there are assembly names specified as strings in formats like a data support XML file, and these assembly names cannot be automatically resolved (or would be resolved incorrectly) by the CLR’s Load method. One use of this method is to expand an incomplete assembly declaration. (For example, if the string is "MyAssembly", it might get expanded to "MyAssembly, Version=2.0.0.0, Culture=neutral, PublicKeyToken=1234567890ABCDEF" before the CLR resolves it.)
This method is provided to shorten a provider’s specification of type names, which can help reduce duplication of a commonly used assembly throughout the code base.
.NET Framework Security
- Full trust for the immediate caller. This member cannot be used by partially trusted code. For more information, see Using Libraries from Partially Trusted Code.