-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathLLBLGenProLINQPadDriver.cs
493 lines (443 loc) · 20.8 KB
/
LLBLGenProLINQPadDriver.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
////////////////////////////////////////////////////////////////////////////////////////////////////////
// LLBLGen Pro LINQPad driver is (c) 2002-2012 Solutions Design. All rights reserved.
// http://www.llblgen.com
////////////////////////////////////////////////////////////////////////////////////////////////////////
// COPYRIGHTS:
// Copyright (c)2002-2012 Solutions Design. All rights reserved.
// http://www.llblgen.com
//
// The LLBLGen Pro LINQPad driver sourcecode is released under the following license (BSD2):
// ----------------------------------------------------------------------
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// 1) Redistributions of source code must retain the above copyright notice, this list of
// conditions and the following disclaimer.
// 2) Redistributions in binary form must reproduce the above copyright notice, this list of
// conditions and the following disclaimer in the documentation and/or other materials
// provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY SOLUTIONS DESIGN ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
// INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A
// PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SOLUTIONS DESIGN OR CONTRIBUTORS BE LIABLE FOR
// ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
// NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
// BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
// STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
// USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
//
// The views and conclusions contained in the software and documentation are those of the authors
// and should not be interpreted as representing official policies, either expressed or implied,
// of Solutions Design.
//
//////////////////////////////////////////////////////////////////////
// Contributers to the code:
// - Frans Bouma [FB]
//////////////////////////////////////////////////////////////////////
// Special thanks to:
// - Jeremy Thomas
//////////////////////////////////////////////////////////////////////
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using LINQPad.Extensibility.DataContext;
using System.Windows.Forms;
using System.IO;
using SD.LLBLGen.Pro.LinqSupportClasses;
using SD.LLBLGen.Pro.ORMSupportClasses;
using LINQPad;
using System.Diagnostics;
using System.Reflection;
using System.Xml;
using System.Data.Common;
namespace SD.LLBLGen.Pro.LINQPadDriver7Plus
{
/// <summary>
/// Main driver class of the LLBLGen Pro LINQPad driver
/// </summary>
public class LLBLGenProLINQPadDriver : StaticDataContextDriver
{
private class DatabaseTypeInfo
{
public string AdoNetPackageName {get;set;}
public string AdoNetPackageVersion {get;set;}
public string DqeConfigClassTypeName {get;set;}
public string DbProviderFactoryInvariantName {get;set;}
}
private readonly Dictionary<DatabaseType, DatabaseTypeInfo> _typeInfoPerDatabaseType;
/// <summary>
/// Initializes a new instance of the <see cref="LLBLGenProLINQPadDriver"/> class.
/// </summary>
public LLBLGenProLINQPadDriver() : base()
{
_typeInfoPerDatabaseType = new Dictionary<DatabaseType, DatabaseTypeInfo>()
{
{ DatabaseType.Access, new DatabaseTypeInfo() { AdoNetPackageName = "System.Data.OleDb", AdoNetPackageVersion = "6.0.0", DqeConfigClassTypeName = "SD.LLBLGen.Pro.DQE.Access.AccessDQEConfiguration", DbProviderFactoryInvariantName="System.Data.OleDb" } },
{ DatabaseType.DB2, new DatabaseTypeInfo() { AdoNetPackageName = "IBM.Data.DB2.Core", AdoNetPackageVersion= "3.1.0.500", DqeConfigClassTypeName= "SD.LLBLGen.Pro.DQE.DB2.DB2DQEConfiguration", DbProviderFactoryInvariantName="IBM.Data.DB2" } },
{ DatabaseType.Firebird, new DatabaseTypeInfo() { AdoNetPackageName = "FirebirdSql.Data.FirebirdClient", AdoNetPackageVersion= "8.5.4", DqeConfigClassTypeName= "SD.LLBLGen.Pro.DQE.Firebird.FirebirdDQEConfiguration", DbProviderFactoryInvariantName="FirebirdSql.Data.FirebirdClient" } },
{ DatabaseType.Oracle, new DatabaseTypeInfo() { AdoNetPackageName = "Oracle.ManagedDataAccess.Core", AdoNetPackageVersion= "3.21.4", DqeConfigClassTypeName= "SD.LLBLGen.Pro.DQE.Oracle.OracleDQEConfiguration", DbProviderFactoryInvariantName="Oracle.ManagedDataAccess.Client" } },
{ DatabaseType.PostgreSQL, new DatabaseTypeInfo() { AdoNetPackageName = "Npgsql", AdoNetPackageVersion= "6.0.0", DqeConfigClassTypeName= "SD.LLBLGen.Pro.DQE.PostgreSql.PostgreSqlDQEConfiguration", DbProviderFactoryInvariantName="Npgsql" } },
{ DatabaseType.SQLServer, new DatabaseTypeInfo() { AdoNetPackageName = "Microsoft.Data.SqlClient", AdoNetPackageVersion= "3.0.1", DqeConfigClassTypeName= "SD.LLBLGen.Pro.DQE.SqlServer.SQLServerDQEConfiguration", DbProviderFactoryInvariantName="System.Data.SqlClient" } },
};
}
/// <summary>
/// Returns a hierarchy of objects describing how to populate the Schema Explorer
/// </summary>
/// <param name="cxInfo">The cx info.</param>
/// <param name="customType">Type of the custom.</param>
/// <returns></returns>
public override List<ExplorerItem> GetSchema(IConnectionInfo cxInfo, Type customType)
{
return new SchemaBuilder(cxInfo, customType).GetSchema();
}
/// <summary>
/// Gets the namespaces to add to the default list of namespaces added to the generateed class executed.
/// </summary>
/// <param name="cxInfo">The cx info.</param>
/// <returns></returns>
public override IEnumerable<string> GetNamespacesToAdd(IConnectionInfo cxInfo)
{
var defaultNamespaces = new List<string>()
{
"SD.LLBLGen.Pro.LinqSupportClasses", "SD.LLBLGen.Pro.ORMSupportClasses", "SD.LLBLGen.Pro.QuerySpec",
};
var templateGroup = CxInfoHelper.GetTemplateGroup(cxInfo);
if(templateGroup == TemplateGroup.Adapter)
{
defaultNamespaces.Add("SD.LLBLGen.Pro.QuerySpec.Adapter");
}
else
{
defaultNamespaces.Add("SD.LLBLGen.Pro.QuerySpec.SelfServicing");
}
var toReturn = base.GetNamespacesToAdd(cxInfo).Union(defaultNamespaces);
var entityAssemblyNamespaces = CxInfoHelper.GetDriverDataElementValue(cxInfo, DriverDataElements.EntityAssemblyNamespacesElement);
if(!string.IsNullOrEmpty(entityAssemblyNamespaces))
{
toReturn = toReturn.Union(entityAssemblyNamespaces.Split(',').Where(s=>!string.IsNullOrEmpty(s)));
}
return toReturn;
}
public override void OverrideDriverDependencies(DriverDependencyInfo dependencyInfo)
{
var dbType = CxInfoHelper.GetDatabaseTypeFromCxInfo(dependencyInfo.CxInfo);
if(dbType==DatabaseType.Undefined)
{
return;
}
DatabaseTypeInfo typeInfo = null;
_typeInfoPerDatabaseType.TryGetValue(dbType, out typeInfo);
if(typeInfo==null)
{
return;
}
dependencyInfo.AddNuGetPackages(new List<(string packageID, string version)>() { (typeInfo.AdoNetPackageName, typeInfo.AdoNetPackageVersion)});
base.OverrideDriverDependencies(dependencyInfo);
}
/// <summary>
/// Gets the namespaces to remove from the default list of namespaces added to the generated class executed.
/// </summary>
/// <param name="cxInfo">The cx info.</param>
/// <returns></returns>
public override IEnumerable<string> GetNamespacesToRemove(IConnectionInfo cxInfo)
{
return base.GetNamespacesToRemove(cxInfo).Union(new [] { "System.Data.Linq", "System.Data.SqlClient", "System.Data.Linq.SqlClient"});
}
/// <summary>
/// Gets the custom display member provider.
/// </summary>
/// <param name="objectToWrite">The object to write.</param>
/// <returns></returns>
public override ICustomMemberProvider GetCustomDisplayMemberProvider(object objectToWrite)
{
var objectToWriteAsEntity = objectToWrite as IEntityCore;
if(objectToWriteAsEntity == null)
{
return null;
}
if(typeof(ICustomMemberProvider).IsAssignableFrom(objectToWriteAsEntity.GetType()))
{
return null;
}
return new EntityMemberProvider(objectToWriteAsEntity);
}
/// <summary>
/// Displays the object in grid.
/// </summary>
/// <param name="objectToDisplay">The object to display.</param>
/// <param name="options">The options.</param>
public override void DisplayObjectInGrid(object objectToDisplay, GridOptions options)
{
if(objectToDisplay != null)
{
Type elementType = LinqUtils.DetermineSetElementType(objectToDisplay.GetType());
if(typeof(IEntityCore).IsAssignableFrom(elementType))
{
var membersToExclude = typeof(EntityBase).GetProperties().Select(p => p.Name)
.Union(typeof(EntityBase2).GetProperties().Select(p => p.Name)).Distinct();
if(typeof(IEntity).IsAssignableFrom(elementType))
{
// remove alwaysFetch/AlreadyFetched flag properties
membersToExclude = membersToExclude
.Union(elementType.GetProperties()
.Where(p => p.PropertyType == typeof(bool) &&
(p.Name.StartsWith("AlreadyFetched") || p.Name.StartsWith("AlwaysFetch")))
.Select(p=>p.Name));
}
options.MembersToExclude = membersToExclude.Distinct().ToArray();
}
}
base.DisplayObjectInGrid(objectToDisplay, options);
}
/// <summary>
/// Initializes the context.
/// </summary>
/// <param name="cxInfo">The cx info.</param>
/// <param name="context">The context.</param>
/// <param name="executionManager">The execution manager.</param>
public override void InitializeContext(IConnectionInfo cxInfo, object context, QueryExecutionManager executionManager)
{
var templateGroup = CxInfoHelper.GetTemplateGroup(cxInfo);
switch(templateGroup)
{
case TemplateGroup.None:
throw new InvalidOperationException("Template group hasn't been specified.");
case TemplateGroup.Adapter:
InitializeContextAdapter(cxInfo, context, executionManager);
break;
case TemplateGroup.SelfServicing:
InitializeContextSelfServicing(cxInfo, context, executionManager);
break;
default:
base.InitializeContext(cxInfo, context, executionManager);
break;
}
var tracer = new ORMPersistenceExecutionListener(executionManager);
Trace.Listeners.Clear();
Trace.Listeners.Add(tracer);
TraceHelper.PersistenceExecutionSwitch.Level = TraceLevel.Verbose;
}
/// <summary>
/// Tears down the context.
/// </summary>
/// <param name="cxInfo">The cx info.</param>
/// <param name="context">The context.</param>
/// <param name="executionManager">The execution manager.</param>
/// <param name="constructorArguments">The constructor arguments.</param>
public override void TearDownContext(IConnectionInfo cxInfo, object context, QueryExecutionManager executionManager, object[] constructorArguments)
{
base.TearDownContext(cxInfo, context, executionManager, constructorArguments);
ILinqMetaData contextAsLinqMetaData = context as ILinqMetaData;
if(context != null)
{
var adapterToUseProperty = contextAsLinqMetaData.GetType().GetProperty("AdapterToUse");
if(adapterToUseProperty != null)
{
IDataAccessAdapter adapterUsed = adapterToUseProperty.GetValue(contextAsLinqMetaData, null) as IDataAccessAdapter;
if(adapterUsed != null)
{
adapterUsed.Dispose();
}
}
}
}
/// <summary>
/// Returns the text to display in the root Schema Explorer node for a given connection info.
/// </summary>
/// <param name="cxInfo">The cx info.</param>
/// <returns></returns>
public override string GetConnectionDescription(IConnectionInfo cxInfo)
{
if(cxInfo == null)
{
return "<null>";
}
var templateGroup = CxInfoHelper.GetTemplateGroup(cxInfo);
return string.Format("{0} - {1}", templateGroup.ToString(),
Path.GetFileNameWithoutExtension(CxInfoHelper.GetEntityAssemblyFilename(cxInfo, templateGroup)));
}
public override bool ShowConnectionDialog(IConnectionInfo cxInfo, ConnectionDialogOptions dialogOptions)
{
bool toReturn = false;
using(var dialog = new ConnectionDialog(cxInfo, dialogOptions.IsNewConnection))
{
var result = dialog.ShowDialog();
toReturn = result == System.Windows.Forms.DialogResult.OK;
if(toReturn)
{
ObtainAndSetEntityAssemblyNamespaces(cxInfo);
}
}
return toReturn;
}
/// <summary>
/// Obtains the and set entity assembly namespaces.
/// </summary>
/// <param name="cxInfo">The cx info.</param>
private void ObtainAndSetEntityAssemblyNamespaces(IConnectionInfo cxInfo)
{
var entityAssemblyFilename = CxInfoHelper.GetEntityAssemblyFilename(cxInfo, CxInfoHelper.GetTemplateGroup(cxInfo));
if(string.IsNullOrEmpty(entityAssemblyFilename))
{
return;
}
var assembly = DataContextDriver.LoadAssemblySafely(entityAssemblyFilename);
var namespaces = assembly.GetTypes().Select(t => t.Namespace).Distinct().ToArray();
CxInfoHelper.SetDriverDataElement(cxInfo, DriverDataElements.EntityAssemblyNamespacesElement, String.Join(",", namespaces));
}
/// <summary>
/// Calls RuntimeConfiguration setup methods and if required calls the orm profiler interceptor too.
/// </summary>
/// <param name="cxInfo">The cx info.</param>
/// <param name="persistenceAssembly">the assembly which is used for persistence and which has a reference to the dqe assembly we're after</param>
private void SetupRuntimeConfiguration(IConnectionInfo cxInfo, Assembly persistenceAssembly)
{
var dbType = CxInfoHelper.GetDatabaseTypeFromCxInfo(cxInfo);
if(dbType == DatabaseType.Undefined)
{
throw new InvalidOperationException("The database type isn't properly determined, so couldn't load the ADO.NET provider");
}
DatabaseTypeInfo typeInfo = null;
_typeInfoPerDatabaseType.TryGetValue(dbType, out typeInfo);
if(typeInfo==null)
{
return;
}
var adonetClient = DataContextDriver.LoadAssemblySafely(typeInfo.AdoNetPackageName + ".dll");
if(adonetClient==null)
{
throw new InvalidOperationException(string.Format("Couldn't load the ADO.NET provider for the package '{0}'", typeInfo.AdoNetPackageName));
}
var dqeAssemblyName = persistenceAssembly.GetReferencedAssemblies().FirstOrDefault(a=>a.Name.StartsWith("SD.LLBLGen.Pro.DQE"));
if(dqeAssemblyName==null)
{
throw new InvalidOperationException(string.Format("The assembly '{0}' doesn't reference a DQE assembly.", persistenceAssembly.FullName));
}
var dqeAssembly = Assembly.Load(dqeAssemblyName);
if(dqeAssembly==null)
{
throw new InvalidOperationException(string.Format("Couldn't load the referenced DQE assembly '{0}'.", dqeAssemblyName.FullName));
}
var dqeConfigurationType = dqeAssembly.GetType(typeInfo.DqeConfigClassTypeName);
if(dqeConfigurationType==null)
{
throw new InvalidOperationException(string.Format("Couldn't find the DQEConfigurationBase derived type '{0}' in the referenced DQE assembly '{1}'.",
typeInfo.DqeConfigClassTypeName, dqeAssemblyName.FullName));
}
Type dbProviderFactoryType = adonetClient.GetTypes().FirstOrDefault(t =>typeof(DbProviderFactory).IsAssignableFrom(t));
if(dbProviderFactoryType==null)
{
throw new InvalidOperationException(string.Format("Couldn't find a DbProviderFactory type in the ADO.NET assembly '{0}.dll'.", typeInfo.AdoNetPackageName));
}
if(CxInfoHelper.GetEnableORMProfiler(cxInfo))
{
dbProviderFactoryType = SD.Tools.OrmProfiler.Interceptor.InterceptorCore.Initialize(GetConnectionDescription(cxInfo), dbProviderFactoryType);
}
// Now some mild reflection to get the juices flowin'... jfc why do things always have to be complicated in .NET...
// This is the equivalent of RuntimeConfiguration.ConfigureDQE<dqeConfigurationType>(c=>c.AddDbProviderFactory(dbProviderFactoryType));
MethodInfo configureMethod = typeof(RuntimeConfiguration).GetMethod("ConfigureDQE").MakeGenericMethod(dqeConfigurationType);
Action<object> delegateToPass = (c)=>dqeConfigurationType.GetMethod("AddDbProviderFactory")
.Invoke(c, new object[] { dbProviderFactoryType, typeInfo.DbProviderFactoryInvariantName });
configureMethod.Invoke(null, System.Reflection.BindingFlags.Public | System.Reflection.BindingFlags.InvokeMethod, null,
new object[] { delegateToPass }, System.Globalization.CultureInfo.CurrentUICulture);
// connection string has already been set, so we skip that.
}
/// <summary>
/// Initializes the context for self servicing. The 'context' is an ILinqMetaData instance
/// </summary>
/// <param name="cxInfo">The cx info.</param>
/// <param name="context">The context.</param>
/// <param name="executionManager">The execution manager.</param>
private void InitializeContextSelfServicing(IConnectionInfo cxInfo, object context, QueryExecutionManager executionManager)
{
string connectionString = CxInfoHelper.GetDriverDataElementValue(cxInfo, DriverDataElements.ConnectionStringElement);
if(string.IsNullOrEmpty(connectionString))
{
// not specified, nothing further.
return;
}
// set actual connection string on CommonEntityBase.
var selfServicingAssemblyFilename = CxInfoHelper.GetDriverDataElementValue(cxInfo, DriverDataElements.SelfServicingAssemblyFilenameElement);
var selfServicingAssembly = context.GetType().BaseType.Assembly;
var commonDaoBaseType = selfServicingAssembly.GetTypes().Where(t=>t.Name.EndsWith("CommonDaoBase")).FirstOrDefault();
if(commonDaoBaseType == null)
{
throw new InvalidOperationException(string.Format("Couldn't find type 'CommonEntityBase' in assembly '{0}'",selfServicingAssemblyFilename));
}
// we now know it's the right assembly
SetupRuntimeConfiguration(cxInfo, selfServicingAssembly);
var actualConnectionStringField = commonDaoBaseType.GetField("ActualConnectionString");
if(actualConnectionStringField == null)
{
throw new InvalidOperationException(string.Format("The type '{0}' doesn't have a static property ActualConnectionString.", commonDaoBaseType.FullName));
}
actualConnectionStringField.SetValue(null, connectionString);
}
/// <summary>
/// Initializes the context for adapter. The 'context' is an ILinqMetaData instance.
/// </summary>
/// <param name="cxInfo">The cx info.</param>
/// <param name="context">The context.</param>
/// <param name="executionManager">The execution manager.</param>
private void InitializeContextAdapter(IConnectionInfo cxInfo, object context, QueryExecutionManager executionManager)
{
ILinqMetaData contextAsLinqMetaData = context as ILinqMetaData;
if(contextAsLinqMetaData == null)
{
throw new InvalidOperationException("'context' isn't an ILinqMetaData typed object");
}
string adapterAssemblyFilename = CxInfoHelper.GetDriverDataElementValue(cxInfo, DriverDataElements.AdapterDBSpecificAssemblyFilenameElement);
var adapterAssembly = DataContextDriver.LoadAssemblySafely(adapterAssemblyFilename);
if(adapterAssembly == null)
{
throw new InvalidOperationException(string.Format("The file '{0}' isn't a valid assembly.", adapterAssemblyFilename));
}
var adapterType = adapterAssembly.GetTypes().Where(t => typeof(IDataAccessAdapter).IsAssignableFrom(t)).FirstOrDefault();
if(adapterType == null)
{
throw new InvalidOperationException(string.Format("The assembly '{0}' doesn't contain an implementation of IDataAccessAdapter.", adapterAssemblyFilename));
}
// we now know it's the right assembly
SetupRuntimeConfiguration(cxInfo, adapterAssembly);
IDataAccessAdapter adapterInstance = null;
string connectionString = CxInfoHelper.GetDriverDataElementValue(cxInfo, DriverDataElements.ConnectionStringElement);
if(string.IsNullOrEmpty(connectionString))
{
// use normal empty ctor
adapterInstance = Activator.CreateInstance(adapterType) as IDataAccessAdapter;
}
else
{
// use ctor which specifies the ctor
adapterInstance = Activator.CreateInstance(adapterType, connectionString) as IDataAccessAdapter;
}
if(adapterInstance==null)
{
throw new InvalidOperationException(string.Format("Couldn't create an instance of adapter type '{0}' from assembly '{1}'.", adapterType.FullName, adapterAssemblyFilename));
}
var adapterToUseProperty = contextAsLinqMetaData.GetType().GetProperty("AdapterToUse");
if(adapterToUseProperty == null)
{
throw new InvalidOperationException(string.Format("The type '{0}' doesn't have a property 'AdapterToUse'.", context.GetType().FullName));
}
adapterToUseProperty.SetValue(contextAsLinqMetaData, adapterInstance, null);
}
#region Class Property Declarations
/// <summary>
/// Gets the name of the author of the driver.
/// </summary>
public override string Author
{
get { return Constants.Author; }
}
/// <summary>
/// Gets the user friendly name.
/// </summary>
public override string Name
{
get { return Constants.Name; }
}
#endregion
}
}