Torna al Thread

Public Class MyFactoryClienti Private Shared _factory As MyCommon.IClienti Sub New() Try Dim assembly As Reflection.Assembly = Reflection.Assembly.LoadFrom(MyCommon.MyRegistry.AssemblyClienti) '<--- Uso una classe per indicare quale assembly usare per ora _factory = CType(assembly.CreateInstance("Database.AdapterClienti"), MyCommon.IClienti) Catch ex As Exception Throw ex End Try End Sub Public Function GetClienti() As List(Of MyCommon.ICliente) Dim l As New List(Of MyCommon.ICliente) Try l = _factory.GetClienti Catch ex As Exception Throw ex End Try Return l End Function End Class
Copyright © dotNetHell.it 2002-2024
Running on Windows Server 2008 R2 Standard, SQL Server 2012 & ASP.NET 3.5