• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ITransactionManager类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ITransactionManager的典型用法代码示例。如果您正苦于以下问题:C# ITransactionManager类的具体用法?C# ITransactionManager怎么用?C# ITransactionManager使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ITransactionManager类属于命名空间,在下文中一共展示了ITransactionManager类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: DataRecipeHandler

 public DataRecipeHandler(ICoeveryServices coeveryServices, ITransactionManager transactionManager)
 {
     _coeveryServices = coeveryServices;
     _transactionManager = transactionManager;
     Logger = NullLogger.Instance;
     T = NullLocalizer.Instance;
 }
开发者ID:polynomicworks,项目名称:Coevery-Framework,代码行数:7,代码来源:DataRecipeHandler.cs


示例2: SpamFilterPartHandler

        public SpamFilterPartHandler(
            IRepository<SpamFilterPartRecord> repository,
            ITransactionManager transactionManager,
            ISpamService spamService
            ) {
            _transactionManager = transactionManager;
            _spamService = spamService;

            Filters.Add(StorageFilter.For(repository));

            OnCreating<SpamFilterPart>((context, part) => {
                part.Status = _spamService.CheckForSpam(part);
            });

            OnPublishing<SpamFilterPart>((context, part) => {
                if (part.Status == SpamStatus.Spam) {
                    if (part.Settings.GetModel<SpamFilterPartSettings>().DeleteSpam) {
                        _transactionManager.Cancel();
                    }

                    context.Cancel = true;
                }
            });

        }
开发者ID:RasterImage,项目名称:Orchard,代码行数:25,代码来源:SpamFilterPartHandler.cs


示例3: SagePayService

 public SagePayService(ITransactionManager transactionManager, ICartSessionManager cartSessionManager, IGetUserGuid getUserGuid, ICartGuidResetter cartGuidResetter)
 {
     _transactionManager = transactionManager;
     _cartSessionManager = cartSessionManager;
     _getUserGuid = getUserGuid;
     _cartGuidResetter = cartGuidResetter;
 }
开发者ID:neozhu,项目名称:Ecommerce,代码行数:7,代码来源:SagePayService.cs


示例4: DataRecipeHandler

 public DataRecipeHandler(IOrchardServices orchardServices, ITransactionManager transactionManager, IRecipeJournal recipeJournal) {
     _orchardServices = orchardServices;
     _transactionManager = transactionManager;
     _recipeJournal = recipeJournal;
     Logger = NullLogger.Instance;
     T = NullLocalizer.Instance;
 }
开发者ID:mikmakcar,项目名称:orchard_fork_learning,代码行数:7,代码来源:DataRecipeHandler.cs


示例5: Init

 public void Init(IEnumerable<Type> dataMigrations) {
    
     var builder = new ContainerBuilder();
     _folders = new StubFolders();
     var contentDefinitionManager = new Mock<IContentDefinitionManager>().Object;
     
     builder.RegisterInstance(new ShellSettings { DataTablePrefix = "TEST_"});
     
     builder.RegisterType<SqlServerDataServicesProvider>().As<IDataServicesProvider>();
     builder.RegisterType<DataServicesProviderFactory>().As<IDataServicesProviderFactory>();
     builder.RegisterType<NullInterpreter>().As<IDataMigrationInterpreter>();
     builder.RegisterInstance(_folders).As<IExtensionFolders>();
     builder.RegisterInstance(contentDefinitionManager).As<IContentDefinitionManager>();
     builder.RegisterType<ExtensionManager>().As<IExtensionManager>();
     builder.RegisterType<DataMigrationManager>().As<IDataMigrationManager>();
     builder.RegisterGeneric(typeof(Repository<>)).As(typeof(IRepository<>));
     builder.RegisterType<StubCacheManager>().As<ICacheManager>();
     builder.RegisterType<StubParallelCacheContext>().As<IParallelCacheContext>();
     builder.RegisterType<StubAsyncTokenProvider>().As<IAsyncTokenProvider>();
     _session = _sessionFactory.OpenSession();
     builder.RegisterInstance(new DefaultContentManagerTests.TestSessionLocator(_session)).As<ISessionLocator>().As<ITransactionManager>();
     foreach(var type in dataMigrations) {
         builder.RegisterType(type).As<IDataMigration>();
     }
     _container = builder.Build();
     _container.Resolve<IExtensionManager>();
     _dataMigrationManager = _container.Resolve<IDataMigrationManager>();
     _repository = _container.Resolve<IRepository<DataMigrationRecord>>();
     _transactionManager = _container.Resolve<ITransactionManager>();
     InitDb();
 }
开发者ID:dioptre,项目名称:nkd,代码行数:31,代码来源:DataMigrationTests.cs


示例6: Init

        public void Init() {
            _session = _sessionFactory.OpenSession();
            foreach (var killType in new[] { typeof(ContentTypeDefinitionRecord), typeof(ContentPartDefinitionRecord), typeof(ContentFieldDefinitionRecord) }) {
                foreach (var killRecord in _session.CreateCriteria(killType).List()) {
                    _session.Delete(killRecord);
                }
            }
            _session.Flush();
            _session.Close();
            _session.Dispose();
            _session = _sessionFactory.OpenSession();

            var builder = new ContainerBuilder();
            builder.RegisterAutoMocking();
            builder.RegisterType<ContentDefinitionManager>().As<IContentDefinitionManager>();
            builder.RegisterGeneric(typeof(Repository<>)).As(typeof(IRepository<>));
            builder.RegisterType(typeof(SettingsFormatter)).As(typeof(ISettingsFormatter));
            builder.RegisterType<Signals>().As<ISignals>();
            builder.RegisterType<StubCacheManager>().As<ICacheManager>();
            builder.RegisterType<StubParallelCacheContext>().As<IParallelCacheContext>();

            _session = _sessionFactory.OpenSession();
            builder.RegisterInstance(_transactionManager = new TestTransactionManager(_session)).As<ITransactionManager>();

            _container = builder.Build();

        }
开发者ID:Golone,项目名称:Orchard,代码行数:27,代码来源:ContentDefinitionManagerTests.cs


示例7: MembershipService

 public MembershipService(IWebsite website, IMemberDao memberDao, IRoleDao roleDao, ITransactionManager transactionManager)
 {
     this._website = website;
     this._memberDao = memberDao;
     this._roleDao = roleDao;
     this._transactionManager = transactionManager;
 }
开发者ID:Brontsy,项目名称:Castlerock,代码行数:7,代码来源:MembershipService.cs


示例8: FileManagerService

 public FileManagerService(IWebsite website, IFileStorage fileStorage, IStorageItemRepository storageItemRepository, ITransactionManager transactionManager)
 {
     this._fileStorage = fileStorage;
     this._website = website;
     this._transactionManager = transactionManager;
     this._storageItemRepository = storageItemRepository;
 }
开发者ID:Brontsy,项目名称:Castlerock,代码行数:7,代码来源:FileManagerService.cs


示例9: ImageService

 public ImageService(IWebsite website, IImageStorage imageStorage, IImageRepository imageRepository, ITransactionManager transactionManager)
 {
     this._website = website;
     this._imageStorage = imageStorage;
     this._imageRepository = imageRepository;
     this._transactionManager = transactionManager;
 }
开发者ID:Brontsy,项目名称:Castlerock,代码行数:7,代码来源:ImageService.cs


示例10: PageProvider

 public PageProvider(ITransactionManager trans,  IRepository<SubSite> repoSite, IRepository<WebPage> repoPage, IRepository<WebPageWidget> repoControl)
 {
     this.trans = trans;
     this.repoSite = repoSite;
     this.repoPage = repoPage;
     this.repoControl = repoControl;
 }
开发者ID:cairabbit,项目名称:daf,代码行数:7,代码来源:PageProvider.cs


示例11: Init

 public override void Init() {
     base.Init();
     _distributedLockService = _container.Resolve<DistributedLockService>();
     _applicationEnvironment = (StubApplicationEnvironment)_container.Resolve<IApplicationEnvironment>();
     _distributedLockRepository = _container.Resolve<IRepository<DistributedLockRecord>>();
     _transactionManager = _container.Resolve<ITransactionManager>();
 }
开发者ID:Higea,项目名称:Orchard,代码行数:7,代码来源:DistributedLockServiceTests.cs


示例12: TestObject

 public TestObject(ILifecycleManager lifecycleManager, IObjectPersistor persistor, INakedObjectAdapter nakedObjectAdapter, ITestObjectFactory factory, ITransactionManager transactionManager)
     : base(factory) {
     this.lifecycleManager = lifecycleManager;
     this.persistor = persistor;
     this.transactionManager = transactionManager;
     NakedObject = nakedObjectAdapter;
 }
开发者ID:NakedObjectsGroup,项目名称:NakedObjectsFramework,代码行数:7,代码来源:TestObject.cs


示例13: SessionLocator

 public SessionLocator(
     ISessionFactoryHolder sessionFactoryHolder,
     ITransactionManager transactionManager) {
     _sessionFactoryHolder = sessionFactoryHolder;
     _transactionManager = transactionManager;
     Logger = NullLogger.Instance;
 }
开发者ID:seifipour,项目名称:exams4doctors,代码行数:7,代码来源:SessionLocator.cs


示例14: PerTransactionLifestyleManagerBase

		public PerTransactionLifestyleManagerBase(ITransactionManager manager)
		{
			Contract.Requires(manager != null);
			Contract.Ensures(_Manager != null);
			_Logger.Debug("created");
			_Manager = manager;
		}
开发者ID:bittercoder,项目名称:Windsor,代码行数:7,代码来源:PerTransactionLifestyleManagerBase.cs


示例15: DatabaseSession

 internal DatabaseSession(IDatabaseCommandFactory databaseCommandFactory, ITransactionManager transactionManager, IDatabaseReaderFactory databaseReaderFactory, IConnectionHandler connectionHandler)
 {
     _databaseCommandFactory = databaseCommandFactory;
     _transactionManager = transactionManager;
     _databaseReaderFactory = databaseReaderFactory;
     _connectionHandler = connectionHandler;
 }
开发者ID:shizzlator,项目名称:Dazzle,代码行数:7,代码来源:DatabaseSession.cs


示例16: RepoTimelineProvider

 public RepoTimelineProvider(IIdGenerator generator, ITransactionManager trans, IRepository<TimelineItem> repoTi, IRepository<TimelineItemHistory> repoTih)
 {
     this.generator = generator;
     this.trans = trans;
     this.repoTi = repoTi;
     this.repoTih = repoTih;
 }
开发者ID:cairabbit,项目名称:daf,代码行数:7,代码来源:RepoTimelineProvider.cs


示例17: TransactionalConnectionFactory

		public TransactionalConnectionFactory(
			ITransactionManager manager, String connectionString,
			Type dbConnectionType)
		{
			_manager = manager;
			_connectionString = connectionString;
			_dbConnectionType = dbConnectionType;
		}
开发者ID:ralescano,项目名称:castle,代码行数:8,代码来源:TransactionalConnectionFactory.cs


示例18: SetProperty

 public override void SetProperty(INakedObjectAdapter nakedObjectAdapter, INakedObjectAdapter value, ITransactionManager transactionManager, ISession session, ILifecycleManager lifecycleManager) {
     try {
         property.SetValue(nakedObjectAdapter.GetDomainObject(), value.GetDomainObject(), null);
     }
     catch (TargetInvocationException e) {
         InvokeUtils.InvocationException("Exception executing " + property, e);
     }
 }
开发者ID:Robin--,项目名称:NakedObjectsFramework,代码行数:8,代码来源:PropertySetterFacetViaSetterMethod.cs


示例19: SetUp

 public void SetUp()
 {
     var container = new WindsorContainer();
     DependencyResolver.SetResolver(new WindsorDependencyResolver(container));
     container.Register(Component.For<ITransactionManager>().ImplementedBy<TestITransactionManager>().Named("transaction.manager"));
     manager = DependencyResolver.Current.GetService<ITransactionManager>();
     attribute = new MvcTransactionAttribute();
 }
开发者ID:joaofx,项目名称:mvccontrib,代码行数:8,代码来源:MvcTransactionAttributeTester.cs


示例20: SessionManager

		/// <summary>
		/// 	Constructor.
		/// </summary>
		/// <param name = "getSession"></param>
		public SessionManager(Func<ISession> getSession, ITransactionManager transactionManager)
		{
			Contract.Requires(getSession != null);
			Contract.Ensures(this.getSession != null);

			this.getSession = getSession;
			this.transactionManager = transactionManager;
		}
开发者ID:razorDevelopers,项目名称:Castle.Facilities.NHibernate,代码行数:12,代码来源:SessionManager.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ITransactionStatus类代码示例发布时间:2022-05-24
下一篇:
C# ITransactionContext类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap