Article information
Article relates to
OpenAccess ORM
Created by
Thomas, Telerik
Last modified
April 6, 2012
Last modified by
Pencho Popadiyn
// Get all assemblies loaded in the current domain.
System.Text.StringBuilder strbuf =
new
System.Text.StringBuilder();
System.Reflection.Assembly[] assemblies =
System.AppDomain.CurrentDomain.GetAssemblies();
foreach
( System.Reflection.Assembly assembly
in
assemblies )
{
string
name = assembly.FullName;
strbuf.Append( name ).Append(
"\r\n"
);
// Check if the current assembly
// is marked with the EnhancedExAttribute.
object
[] customAttributes = assembly.GetCustomAttributes(
typeof
(Telerik.OpenAccess.RT.EnhancedExAttribute),
false
if
( customAttributes.Length == 1 )
strbuf.Append(
" Enhanced!\r\n"
// Print all persistent capable classes in the assembly.
( Type t
assembly.GetTypes() )
(
( Telerik.OpenAccess.SPI.dataobjects.PersistenceCapable )
.IsAssignableFrom( t ) )
" Persistent Type: "
)
.Append( t.FullName ).Append(
}
System.Console.WriteLine( strbuf.ToString() );
' Get all assemblies loaded in the current domain.
Dim
strbuf
As
New
System.Text.StringBuilder()
assemblies()
System.Reflection.
Assembly
= System.AppDomain.CurrentDomain.GetAssemblies()
For
Each
[assembly]
In
assemblies
name
String
= [assembly].FullName
strbuf.Append(name).Append(vbCrLf)
' Check if the current assembly
' is marked with the EnhancedExAttribute.
customAttributes()
Object
= [assembly].GetCustomAttributes(
GetType
False
If
customAttributes.Length = 1
Then
" Enhanced!"
& vbCrLf)
' Print all persistent capable classes in the assembly.
t
Type
[assembly].GetTypes()
(Telerik.OpenAccess.SPI.dataobjects.PersistenceCapable).IsAssignableFrom(t)
).Append(t.FullName).Append(vbCrLf)
End
Next
System.Console.WriteLine(strbuf.ToString())
Resources Buy Try