本文整理汇总了C#中CreateCustomObjectSpaceProviderEventArgs类的典型用法代码示例。如果您正苦于以下问题:C# CreateCustomObjectSpaceProviderEventArgs类的具体用法?C# CreateCustomObjectSpaceProviderEventArgs怎么用?C# CreateCustomObjectSpaceProviderEventArgs使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
CreateCustomObjectSpaceProviderEventArgs类属于命名空间,在下文中一共展示了CreateCustomObjectSpaceProviderEventArgs类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateDefaultObjectSpaceProvider
protected override void CreateDefaultObjectSpaceProvider(CreateCustomObjectSpaceProviderEventArgs args) {
if(args.Connection != null) {
args.ObjectSpaceProvider = new EFObjectSpaceProviderCF(typeof(EFDemoDbContext), TypesInfo, null, (DbConnection)args.Connection);
}
else {
args.ObjectSpaceProvider = new EFObjectSpaceProviderCF(typeof(EFDemoDbContext), TypesInfo, null, args.ConnectionString);
}
}
示例2: CreateDefaultObjectSpaceProvider
protected override void CreateDefaultObjectSpaceProvider(CreateCustomObjectSpaceProviderEventArgs args)
{
IdentityMSSqlConnectionProvider.Register();
args.ObjectSpaceProviders.Add(new XPObjectSpaceProvider(ConfigurationManager.ConnectionStrings["ConnectionStringXpo"].ConnectionString, null, false));
args.ObjectSpaceProviders.Add(new EFObjectSpaceProvider(typeof(SimpleProjectManagerDbContext), ConfigurationManager.ConnectionStrings["ConnectionStringEF"].ConnectionString));
args.ObjectSpaceProviders.Add(new NonPersistentObjectSpaceProvider(TypesInfo, null));
}
示例3: CreateDefaultObjectSpaceProvider
protected override void CreateDefaultObjectSpaceProvider(CreateCustomObjectSpaceProviderEventArgs args)
{
args.ObjectSpaceProvider = new XPObjectSpaceProvider(args.ConnectionString, args.Connection, false);
NonPersistentEntityStore entityStore = new NonPersistentEntityStore((TypesInfo)TypesInfo);
entityStore.RegisterEntity(typeof(IPerson));
nonPersistentProvider = new NonPersistentObjectSpaceProvider(TypesInfo, entityStore);
args.ObjectSpaceProviders.Add(nonPersistentProvider);
}
示例4: application_CreateCustomObjectSpaceProvider
void application_CreateCustomObjectSpaceProvider(object sender, CreateCustomObjectSpaceProviderEventArgs e)
{
//Use following two lines for the local connection:
//var persistenceManager = new PersistenceManager(ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString);
//persistenceManager.AddMappingAssembly(typeof(PersonMap).Assembly);
var persistenceManager = (IPersistenceManager)new RemotePersistenceManagerProxy("http://localhost:8733/Design_Time_Addresses/NHibernateService/Service1").GetTransparentProxy();
e.ObjectSpaceProvider = new NH.NHObjectSpaceProvider(XafTypesInfo.Instance, persistenceManager);
}
示例5: CreateDefaultObjectSpaceProvider
protected override void CreateDefaultObjectSpaceProvider(CreateCustomObjectSpaceProviderEventArgs args)
{
string connectionString = ConfigurationManager.ConnectionStrings["ConnectionStringXpo"].ConnectionString;
if (!String.IsNullOrEmpty(connectionString)){
CreateXPObjectSpaceProvider(ConfigurationManager.ConnectionStrings["ConnectionStringXpo"].ConnectionString, args);
}
args.ObjectSpaceProviders.Add(new EFObjectSpaceProvider(typeof(SimpleProjectManagerDbContext), ConfigurationManager.ConnectionStrings["ConnectionStringEF"].ConnectionString));
args.ObjectSpaceProviders.Add(new NonPersistentObjectSpaceProvider(TypesInfo, null));
}
示例6: CreateDefaultObjectSpaceProvider
protected override void CreateDefaultObjectSpaceProvider(CreateCustomObjectSpaceProviderEventArgs args)
{
//args.ObjectSpaceProvider = new XPObjectSpaceProviderThreadSafe(args.ConnectionString, args.Connection);
args.ObjectSpaceProviders.Add(new EFObjectSpaceProvider(
typeof(NKDC), (TypesInfo)TypesInfo, null, args.ConnectionString,
"res://NKD.Module.BusinessObjects/NKD.csdl|res://NKD.Module.BusinessObjects/NKD.ssdl|res://NKD.Module.BusinessObjects/NKD.msl",
"System.Data.SqlClient"));
//args.ObjectSpaceProviders.Add(new XPObjectSpaceProvider(args.ConnectionString, null));
}
示例7: CreateXPObjectSpaceProvider
private void CreateXPObjectSpaceProvider(string connectionString, CreateCustomObjectSpaceProviderEventArgs e)
{
System.Web.HttpApplicationState application = (System.Web.HttpContext.Current != null) ? System.Web.HttpContext.Current.Application : null;
IXpoDataStoreProvider dataStoreProvider = null;
if(application != null && application["DataStoreProvider"] != null) {
dataStoreProvider = application["DataStoreProvider"] as IXpoDataStoreProvider;
e.ObjectSpaceProvider = new XPObjectSpaceProvider(dataStoreProvider, true);
}
else {
if(!String.IsNullOrEmpty(connectionString)) {
connectionString = DevExpress.Xpo.XpoDefault.GetConnectionPoolString(connectionString);
dataStoreProvider = new ConnectionStringDataStoreProvider(connectionString, true);
}
else if(e.Connection != null) {
dataStoreProvider = new ConnectionDataStoreProvider(e.Connection);
}
if (application != null) {
application["DataStoreProvider"] = dataStoreProvider;
}
e.ObjectSpaceProvider = new XPObjectSpaceProvider(dataStoreProvider, true);
}
}
示例8: ApplicationOnCreateCustomObjectSpaceProvider
private void ApplicationOnCreateCustomObjectSpaceProvider(object sender, CreateCustomObjectSpaceProviderEventArgs createCustomObjectSpaceProviderEventArgs) {
if (!(createCustomObjectSpaceProviderEventArgs.ObjectSpaceProvider is IXpandObjectSpaceProvider))
Application.CreateCustomObjectSpaceprovider(createCustomObjectSpaceProviderEventArgs);
}
示例9: CreateDefaultObjectSpaceProvider
protected override void CreateDefaultObjectSpaceProvider(CreateCustomObjectSpaceProviderEventArgs args) {
args.ObjectSpaceProvider = new SecuredObjectSpaceProvider(
(SecurityStrategy) Security, args.ConnectionString, args.Connection);
}
示例10: OnCreateCustomObjectSpaceProvider
protected override void OnCreateCustomObjectSpaceProvider(CreateCustomObjectSpaceProviderEventArgs args) {
this.CreateCustomObjectSpaceprovider(args);
base.OnCreateCustomObjectSpaceProvider(args);
}
示例11: getConnectionStringWithOutThreadSafeDataLayerInitialization
string getConnectionStringWithOutThreadSafeDataLayerInitialization(CreateCustomObjectSpaceProviderEventArgs args)
{
return args.Connection != null ? args.Connection.ConnectionString : args.ConnectionString;
}
示例12: CreateDefaultObjectSpaceProvider
protected override void CreateDefaultObjectSpaceProvider(CreateCustomObjectSpaceProviderEventArgs args) {
this.CreateCustomObjectSpaceprovider(args, null);
}
示例13: CreateDefaultObjectSpaceProvider
protected override void CreateDefaultObjectSpaceProvider(CreateCustomObjectSpaceProviderEventArgs args)
{
args.ObjectSpaceProviders.Add(new XPObjectSpaceProvider(ConfigurationManager.ConnectionStrings["ConnectionStringXpo"].ConnectionString, null, true));
args.ObjectSpaceProviders.Add(new EFObjectSpaceProvider(typeof(RisusDbContext), ConfigurationManager.ConnectionStrings["ConnectionStringEF"].ConnectionString));
}
示例14: ApplicationOnCreateCustomObjectSpaceProvider
private void ApplicationOnCreateCustomObjectSpaceProvider(object sender, CreateCustomObjectSpaceProviderEventArgs createCustomObjectSpaceProviderEventArgs) {
if (!(createCustomObjectSpaceProviderEventArgs.ObjectSpaceProviders.OfType<XpandObjectSpaceProvider>().Any()))
Application.CreateCustomObjectSpaceprovider(createCustomObjectSpaceProviderEventArgs);
}
示例15: CreateDefaultObjectSpaceProvider
protected override void CreateDefaultObjectSpaceProvider(CreateCustomObjectSpaceProviderEventArgs args) {
args.ObjectSpaceProvider = new XPObjectSpaceProvider(args.ConnectionString, args.Connection);
}