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

C# ISessionStorage类代码示例

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

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



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

示例1: PrepareAuthenticationContext

 public PrepareAuthenticationContext(ISessionStorage sessionStorage, Uri requestUri, string redirectPath, IDictionary<string, string> parameters)
 {
     RequestUri = requestUri;
     SessionStorage = sessionStorage;
     RedirectPath = redirectPath;
     Parameters = parameters;
 }
开发者ID:smithkl42,项目名称:SimpleSocialAuth,代码行数:7,代码来源:PrepareAuthenticationContext.cs


示例2: NHibernateSessionConfiguration

 public NHibernateSessionConfiguration(
     string sessionKey, 
     ISessionStorage sessionStorage, 
     IAutoPersistenceModelGenerator autoPersistenceModelGenerator) 
     : this(sessionKey, sessionStorage, autoPersistenceModelGenerator, new Dictionary<string, string>())
 {
 }
开发者ID:jongeorge1,项目名称:SharpArch.Futures,代码行数:7,代码来源:NHibernateSessionConfiguration.cs


示例3: Configure

        public static void Configure(ISessionStorage storage)
        {
            var baseEntityToIgnore = new[] { 
                typeof(NHibernate.AspNet.Identity.DomainModel.EntityWithTypedId<int>), 
                typeof(NHibernate.AspNet.Identity.DomainModel.EntityWithTypedId<string>), 
            };

            var allEntities = new[] { 
                typeof(IdentityUser), 
                typeof(ApplicationUser), 
                typeof(IdentityRole), 
                typeof(IdentityUserLogin), 
                typeof(IdentityUserClaim), 
            };

            var mapper = new ConventionModelMapper();
            DefineBaseClass(mapper, baseEntityToIgnore);
            mapper.IsComponent((type, declared) => typeof(NHibernate.AspNet.Identity.DomainModel.ValueObject).IsAssignableFrom(type));

            mapper.AddMapping<IdentityUserMap>();
            mapper.AddMapping<IdentityRoleMap>();
            mapper.AddMapping<IdentityUserClaimMap>();

            var mapping = mapper.CompileMappingFor(allEntities);
            System.Diagnostics.Debug.WriteLine(mapping.AsString());

            var configuration = NHibernateSession.Init(storage, mapping);
            BuildSchema(configuration);
        }
开发者ID:robocik,项目名称:NHibernate.AspNet.Identity,代码行数:29,代码来源:DataConfig.cs


示例4: Init

        public static INHibernateConfigurationService Init(ISessionStorage storage, INHibernateConfigurationService config)
        {
            Storage = storage;
            SessionFactory = config.CreateSessionFactory();

            return config;
        }
开发者ID:trasa,项目名称:presentations,代码行数:7,代码来源:NHibernateSession.cs


示例5: Init

 public static void Init(Configuration configuration, ISessionStorage sessionStorage)
 {
     _sessionFactory = configuration.BuildSessionFactory();
     _sessionStorage = sessionStorage;
     #if DEBUG
     //            HibernatingRhinos.NHibernate.Profiler.Appender.NHibernateProfiler.Initialize();
     #endif
 }
开发者ID:hhariri,项目名称:MetaBlogAPI,代码行数:8,代码来源:SessionManager.cs


示例6: Init

		public static Configuration Init(
			ISessionStorage storage, 
			string[] mappingAssemblies,
			AutoPersistenceModel autoPersistenceModel,
			string cfgFile,
			string validatorCfgFile)
		{
			return Init(storage, mappingAssemblies, autoPersistenceModel, cfgFile, null, validatorCfgFile, null);
		}
开发者ID:EdisonCP,项目名称:sharp-architecture,代码行数:9,代码来源:NHibernateSession.cs


示例7: Configure

        public static void Configure(ISessionStorage storage)
        {
            var internalTypes = new[] { typeof(ApplicationUser) };

            var mapping = MappingHelper.GetIdentityMappings(internalTypes);
            //System.Diagnostics.Debug.WriteLine(mapping.AsString());

            var newMapping = mapping.AsString().Split(); // 6-16-14 added to handle error : RPA
            //var configuration = NHibernateSession.Init(storage, newMapping);
            //BuildSchema(configuration);
        }
开发者ID:RichardPAsch,项目名称:PIMS,代码行数:11,代码来源:DataConfig.cs


示例8: Configure

        public static void Configure(ISessionStorage storage)
        {
            var internalTypes = new[] {
                typeof(ApplicationUser)
            };

            var mapping = MappingHelper.GetIdentityMappings(internalTypes);
            System.Diagnostics.Debug.WriteLine(mapping.AsString());

            var configuration = NHibernateSession.Init(storage, mapping);
            BuildSchema(configuration);
        }
开发者ID:sun51586,项目名称:NHibernate.AspNet.Identity,代码行数:12,代码来源:DataConfig.cs


示例9: InitialiseNHibernateSessions

        public static void InitialiseNHibernateSessions(ISessionStorage session)
        {
            var factory = Fluently.Configure()
                .Database(MsSqlConfiguration.MsSql2008.ConnectionString(c => c.FromConnectionStringWithKey("nhibernate-template")).ShowSql().AdoNetBatchSize(100))
                .Mappings(m => m.UsePersistenceModel(new AutoPersistenceModelGenerator().Generate()))
                .ExposeConfiguration(cfg =>
                {
                    cfg.SetProperty("connection.release_mode", "auto");
                })
                .BuildConfiguration();

            NHibernateSession.InitStorage(session);
            NHibernateSession.AddConfiguration(NHibernateSession.DefaultFactoryKey, factory.BuildSessionFactory(), factory, string.Empty);
        }
开发者ID:RossMerr,项目名称:Template,代码行数:14,代码来源:NHibernateConfig.cs


示例10: InitNhibernateSession

        public void InitNhibernateSession(ISessionStorage sessionStorage, string nHibernateConfig)
        {
            var assembly = Assembly.GetAssembly(typeof(User));
            var mappingAssembly = assembly.CodeBase.ToLower();

            try {
                NHibernateSession.Init(sessionStorage,
                    new[] {mappingAssembly},
                    new AutoPersistenceModelGenerator().Generate(),
                    nHibernateConfig);
            } catch (Exception ex) {
                Console.WriteLine(ex.ToString());
                throw;
            }
        }
开发者ID:yodiz,项目名称:CarbonFitness,代码行数:15,代码来源:Bootstrapper.cs


示例11: InitDatalayer

        public void InitDatalayer(ISessionStorage sessionStorage)
        {
            /*
             * Ugly hack?
             *  The thought was that if the file doesnt exist - use template for basic configuration,
             *  Then ask user to enter location of sql-server, username password etc.
             */
            var templateConfigFile = nHibernateConfig.Replace(".config", ".template.config");
            if (!File.Exists(nHibernateConfig) && File.Exists(templateConfigFile))
            {
                File.Copy(templateConfigFile, nHibernateConfig);
            }

            bootstrapper.InitNhibernateSession(sessionStorage, nHibernateConfig);
        }
开发者ID:yodiz,项目名称:CarbonFitness,代码行数:15,代码来源:Bootstrapper.cs


示例12: SessionManager

        public SessionManager(ISessionStorage storage)
        {
            _storage = storage;

            Configuration configuration = new Configuration().Configure();

            InitValidator(configuration);

            configuration.EventListeners.FlushEntityEventListeners = new IFlushEntityEventListener[] { new FlushEntityEventListener() };

            var validateFieldsEventListener = new ValidateFieldsEventListener(_validatorEngine);
            configuration.EventListeners.PreInsertEventListeners = new IPreInsertEventListener[] { validateFieldsEventListener, new ValidatePreInsertEventListener() };
            configuration.EventListeners.PreUpdateEventListeners = new IPreUpdateEventListener[] { validateFieldsEventListener, new ValidatePreUpdateEventListener() };

            _factory = InitFluentMappings(configuration).BuildSessionFactory();
        }
开发者ID:Rei-li,项目名称:Dixiton,代码行数:16,代码来源:SessionManager.cs


示例13: Configure

        public static void Configure(ISessionStorage storage)
        {
            var internalTypes = new[] {
                typeof(IdentityUser)
            };

            var mapping = MappingHelper.GetIdentityMappings(internalTypes);

            string[] mappings = new string[mapping.Items.Length];

            for (int i = 0; i < mapping.Items.Length; i++)
            {
                mappings[i] = mapping.Items[i].ToString();
            }

            NHibernateSession.Init(storage, mappings);
        }
开发者ID:tbrito,项目名称:salus,代码行数:17,代码来源:DataConfig.cs


示例14: WebNHUnitOfWork

        public WebNHUnitOfWork(ISessionStorage sessionStorage, ILog log)
        {
            if (sessionStorage == null)
            {
                throw Error.ArgumentNull("sessionStorage");
            }

            if (log == null)
            {
                throw Error.ArgumentNull("log");
            }

            Log = log;

            SessionStorage = sessionStorage;

            SubscribeToSessionAddedEvent();

            WrappedSessions = sessionStorage.GetAll().Select(s => new SessionUnitOfWork(s, Log)).ToList();
        }
开发者ID:pleb,项目名称:Chillow,代码行数:20,代码来源:WebNHUnitOfWork.cs


示例15: SessionManager

        public SessionManager(ISessionStorage sessionStorage, ISessionFactoryManager sessionFactoryManager, ILog log)
        {
            if (sessionStorage == null)
            {
                throw Error.ArgumentNull("sessionStorage");
            }

            if (sessionFactoryManager == null)
            {
                throw Error.ArgumentNull("sessionFactoryManager");
            }

            if (log == null)
            {
                throw Error.ArgumentNull("log");
            }

            SessionStorage = sessionStorage;
            SessionFactoryManager = sessionFactoryManager;
            Log = log;
        }
开发者ID:pleb,项目名称:Chillow,代码行数:21,代码来源:SessionManager.cs


示例16: Initialize

 //public static void Initialize(ISessionStorage storage, IInterceptor interceptor)
 //{
 //    _sessionSource = storage;
 //    _sessionFactory = new SessionFactory(interceptor);
 //}
 public static void Initialize(ISessionStorage storage, SessionFactoryEventListeners eventListeners)
 {
     _sessionSource = storage;
     _sessionFactory = new SessionFactory(eventListeners);
 }
开发者ID:dblock,项目名称:codeproject,代码行数:10,代码来源:SessionManager.cs


示例17: HomeController

 public HomeController(IUserService userService, ISessionStorage sessionStorage)
 {
     _userService = userService;
     _sessionStorage = sessionStorage;
 }
开发者ID:abaczynski,项目名称:PurpleBricksDemo,代码行数:5,代码来源:HomeController.cs


示例18: InitStorage

 public static void InitStorage(ISessionStorage storage)
 {
     Check.Require(storage != null, "storage mechanism was null but must be provided");
     Check.Require(Storage == null, "A storage mechanism has already been configured for this application");
     Storage = storage;
 }
开发者ID:mwhelan,项目名称:Sharp-Architecture,代码行数:6,代码来源:NHibernateSession.cs


示例19: Init

 public static Configuration Init(
     ISessionStorage storage, 
     string[] mappingAssemblies, 
     AutoPersistenceModel autoPersistenceModel, 
     string cfgFile, 
     IDictionary<string, string> cfgProperties, 
     string validatorCfgFile, 
     IPersistenceConfigurer persistenceConfigurer)
 {
     InitStorage(storage);
     try
     {
         return AddConfiguration(
             DefaultFactoryKey, 
             mappingAssemblies, 
             autoPersistenceModel, 
             cfgFile, 
             cfgProperties, 
             validatorCfgFile, 
             persistenceConfigurer);
     }
     catch
     {
         // If this NHibernate config throws an exception, null the Storage reference so 
         // the config can be corrected without having to restart the web application.
         Storage = null;
         throw;
     }
 }
开发者ID:mwhelan,项目名称:Sharp-Architecture,代码行数:29,代码来源:NHibernateSession.cs


示例20: Init

        public void Init()
        {
            _sessionStorage = new SimpleSessionStorage();

            // news management config area
            _newsMgtConnectionString = "Server=localhost;database=ConfORMSample;Integrated Security=SSPI;";

            _newsMgtAssemblies = new List<string>
                              {
                                  "ConfORMSample.NewsMgt.Entities.dll"
                              };

            _newsMgtConfigBuilder = new Football.SqlServerConfORMConfigBuilder(_newsMgtAssemblies, "ConfORMSample.dbo");

            NHibernateSession.Init(_newsMgtConfigBuilder, _sessionStorage, _newsMgtConnectionString, "NewsMgt");

            // football management config area
            _footballConnectionString = "Server=localhost;database=ConfORMSample_FootballMsgt;Integrated Security=SSPI;";

            _footballAssemblies = new List<string>
                              {
                                  "ConfORMSample.Football.Entities.dll"
                              };

            _footballConfigBuilder = new Football.SqlServerConfORMConfigBuilder(_footballAssemblies, "ConfORMSample_FootballMsgt.dbo");

            NHibernateSession.Init(_footballConfigBuilder, _sessionStorage, _footballConnectionString, "FootballMgt");
        }
开发者ID:ghy,项目名称:ConfORMSample,代码行数:28,代码来源:MultipleDatabaseTesting.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# ISet类代码示例发布时间:2022-05-24
下一篇:
C# ISessionService类代码示例发布时间: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