当前位置: 首页>>代码示例>>C#>>正文


C# CreateCustomObjectSpaceProviderEventArgs类代码示例

本文整理汇总了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);
			}
		}
开发者ID:kamchung322,项目名称:eXpand,代码行数:8,代码来源:EFDemoWinApplication.cs

示例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));
        }
开发者ID:incjonya,项目名称:demos,代码行数:8,代码来源:WinApplication.cs

示例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);
        }
开发者ID:derjabkin,项目名称:XafDemos,代码行数:9,代码来源:WinApplication.cs

示例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);
        }
开发者ID:kamchung322,项目名称:eXpand,代码行数:9,代码来源:Module.cs

示例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));
 }
开发者ID:incjonya,项目名称:demos,代码行数:9,代码来源:WebApplication.cs

示例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));
        }
开发者ID:dioptre,项目名称:nkd,代码行数:10,代码来源:WebApplication.cs

示例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);
     }
 }
开发者ID:incjonya,项目名称:demos,代码行数:22,代码来源:WebApplication.cs

示例8: ApplicationOnCreateCustomObjectSpaceProvider

 private void ApplicationOnCreateCustomObjectSpaceProvider(object sender, CreateCustomObjectSpaceProviderEventArgs createCustomObjectSpaceProviderEventArgs) {
     if (!(createCustomObjectSpaceProviderEventArgs.ObjectSpaceProvider is IXpandObjectSpaceProvider))
         Application.CreateCustomObjectSpaceprovider(createCustomObjectSpaceProviderEventArgs);
 }
开发者ID:martys,项目名称:eXpand,代码行数:4,代码来源:FilterDataStoreModuleBase.cs

示例9: CreateDefaultObjectSpaceProvider

 protected override void CreateDefaultObjectSpaceProvider(CreateCustomObjectSpaceProviderEventArgs args) {
     args.ObjectSpaceProvider = new SecuredObjectSpaceProvider(
         (SecurityStrategy) Security, args.ConnectionString, args.Connection);
 }
开发者ID:aries544,项目名称:eXpand,代码行数:4,代码来源:WinApplication.cs

示例10: OnCreateCustomObjectSpaceProvider

 protected override void OnCreateCustomObjectSpaceProvider(CreateCustomObjectSpaceProviderEventArgs args) {
     this.CreateCustomObjectSpaceprovider(args);
     base.OnCreateCustomObjectSpaceProvider(args);
 }
开发者ID:martys,项目名称:eXpand,代码行数:4,代码来源:XpandWinApplication.cs

示例11: getConnectionStringWithOutThreadSafeDataLayerInitialization

 string getConnectionStringWithOutThreadSafeDataLayerInitialization(CreateCustomObjectSpaceProviderEventArgs args)
 {
     return args.Connection != null ? args.Connection.ConnectionString : args.ConnectionString;
 }
开发者ID:akingunes,项目名称:eXpand,代码行数:4,代码来源:WorldCreatorModuleBase.cs

示例12: CreateDefaultObjectSpaceProvider

 protected override void CreateDefaultObjectSpaceProvider(CreateCustomObjectSpaceProviderEventArgs args) {
     this.CreateCustomObjectSpaceprovider(args, null);
 }
开发者ID:aries544,项目名称:eXpand,代码行数:3,代码来源:WebApplication.cs

示例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));
 }
开发者ID:iTech75,项目名称:Risus,代码行数:5,代码来源:WebApplication.cs

示例14: ApplicationOnCreateCustomObjectSpaceProvider

 private void ApplicationOnCreateCustomObjectSpaceProvider(object sender, CreateCustomObjectSpaceProviderEventArgs createCustomObjectSpaceProviderEventArgs) {
     if (!(createCustomObjectSpaceProviderEventArgs.ObjectSpaceProviders.OfType<XpandObjectSpaceProvider>().Any()))
         Application.CreateCustomObjectSpaceprovider(createCustomObjectSpaceProviderEventArgs);
 }
开发者ID:paulute,项目名称:eXpand,代码行数:4,代码来源:DashboardModule.cs

示例15: CreateDefaultObjectSpaceProvider

 protected override void CreateDefaultObjectSpaceProvider(CreateCustomObjectSpaceProviderEventArgs args) {
     args.ObjectSpaceProvider = new XPObjectSpaceProvider(args.ConnectionString, args.Connection);
 }
开发者ID:noxe,项目名称:eXpand,代码行数:3,代码来源:WinApplication.cs


注:本文中的CreateCustomObjectSpaceProviderEventArgs类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。