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

C# IFrameworkContext类代码示例

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

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



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

示例1: EnsureCoreDataTask

 public EnsureCoreDataTask(IFrameworkContext context, IHiveManager coreManager, IEnumerable<Lazy<Permission, PermissionMetadata>> permissions,
     ISecurityService securityService)
     : base(context, coreManager)
 {
     _permissions = permissions;
     _securityService = securityService;
 }
开发者ID:paulsuart,项目名称:rebelcmsxu5,代码行数:7,代码来源:EnsureCoreDataTask.cs


示例2: ProviderBootstrapper

        /// <summary>
        /// Initializes a new instance of the <see cref="ProviderBootstrapper"/> class if sufficient configuration information has been supplied by the user.
        /// </summary>
        /// <param name="existingConfig">The existing config.</param>
        /// <param name="frameworkContext"></param>
        /// <remarks></remarks>
        public ProviderBootstrapper(ProviderConfigurationSection existingConfig, IFrameworkContext frameworkContext)
        {
            _existingConfig = existingConfig;
            _frameworkContext = frameworkContext;

        
        }
开发者ID:RebelCMS,项目名称:rebelcmsxu5,代码行数:13,代码来源:ProviderBootstrapper.cs


示例3: InitDataTypes

        /// <summary>
        /// Creates the test data types
        /// </summary>
        public List<DataType> InitDataTypes(IFrameworkContext frameworkContext)
        {
            // much neater :)
            _dataTypes = CoreFakeCmsData.RequiredCoreUserAttributeTypes()
                            .Select(x => frameworkContext.TypeMappers.Map<DataType>(x))
                            .ToList();

            //_dataTypes = new List<DataType>();
            //foreach (var v in CoreCmsData.RequiredCoreUserAttributeTypes())
            //{
            //    var a = frameworkContext.TypeMappers.Map<DataType>(v);
            //    _dataTypes.Add(a);
            //}

            //get the data types from the CoreCmsData
            //var dataTypes = new List<DataType>()
            //        {
            //            frameworkContext.TypeMappers.Map<DataType>(CoreCmsData.RequiredCoreUserAttributeTypes().Single(x => x.Id == new HiveId("rte-pe".EncodeAsGuid()))),
            //            frameworkContext.TypeMappers.Map<DataType>(CoreCmsData.RequiredCoreUserAttributeTypes().Single(x => x.Id == new HiveId("sltb-pe".EncodeAsGuid()))),
            //            frameworkContext.TypeMappers.Map<DataType>(CoreCmsData.RequiredCoreUserAttributeTypes().Single(x => x.Id == new HiveId("csp-pe".EncodeAsGuid()))),
            //            frameworkContext.TypeMappers.Map<DataType>(CoreCmsData.RequiredCoreUserAttributeTypes().Single(x => x.Id == new HiveId("tag-pe".EncodeAsGuid()))),
            //            frameworkContext.TypeMappers.Map<DataType>(CoreCmsData.RequiredCoreUserAttributeTypes().Single(x => x.Id == new HiveId("mltb-pe".EncodeAsGuid()))),
            //            frameworkContext.TypeMappers.Map<DataType>(CoreCmsData.RequiredCoreUserAttributeTypes().Single(x => x.Id == new HiveId("media-picker-pe".EncodeAsGuid()))),
            //            frameworkContext.TypeMappers.Map<DataType>(CoreCmsData.RequiredCoreUserAttributeTypes().Single(x => x.Id == new HiveId("integer-pe".EncodeAsGuid()))),
            //            frameworkContext.TypeMappers.Map<DataType>(CoreCmsData.RequiredCoreUserAttributeTypes().Single(x => x.Id == new HiveId("uploader-pe".EncodeAsGuid())))
            //        };

            //_dataTypes = dataTypes;
            LogHelper.Error<UmbracoXmlImportHelper>(String.Format("There were {0} data types found", _dataTypes.Count), new Exception());
            return _dataTypes;
        }
开发者ID:aqueduct,项目名称:UmbracoPugPigConnector,代码行数:34,代码来源:ImportHelper.cs


示例4: EntityRepositoryFactory

        //public EntityRepositoryFactory(ProviderMetadata providerMetadata, 
        //    ProviderRevisionSessionFactory<TypedEntity> revisionRepositoryFactory, 
        //    ProviderSchemaSessionFactory schemaRepositoryFactory,
        //    IFrameworkContext frameworkContext, global::NHibernate.Cfg.Configuration nhConfig)
        //    : base(providerMetadata, revisionRepositoryFactory, schemaRepositoryFactory, frameworkContext)
        //{
        //    Helper = new NhFactoryHelper(nhConfig, null, false, false, frameworkContext);
        //}

        public EntityRepositoryFactory(ProviderMetadata providerMetadata,
            AbstractRevisionRepositoryFactory<TypedEntity> revisionRepositoryFactory,
            AbstractSchemaRepositoryFactory schemaRepositoryFactory,
            IFrameworkContext frameworkContext, ProviderDependencyHelper dependencyHelper)
            : base(providerMetadata, revisionRepositoryFactory, schemaRepositoryFactory, frameworkContext, dependencyHelper)
        {
        }
开发者ID:Joebeazelman,项目名称:rebelcmsxu5,代码行数:16,代码来源:EntityRepositoryFactory.cs


示例5: ProviderSetup

        public ProviderSetup(ProviderUnitFactory unitFactory, ProviderMetadata providerMetadata, IFrameworkContext frameworkContext, AbstractProviderBootstrapper bootstrapper, int priorityOrdinal)
            : base(providerMetadata, frameworkContext, bootstrapper, priorityOrdinal)
        {
            Mandate.ParameterNotNull(unitFactory, "unitFactory");

            UnitFactory = unitFactory;
        }
开发者ID:Joebeazelman,项目名称:rebelcmsxu5,代码行数:7,代码来源:ProviderSetup.cs


示例6: ReadonlyProviderSetup

 protected ReadonlyProviderSetup(ProviderMetadata providerMetadata, IFrameworkContext frameworkContext, AbstractProviderBootstrapper bootstrapper, int priorityOrdinal) 
     : base(providerMetadata, frameworkContext, bootstrapper, priorityOrdinal)
 {
     Mandate.ParameterNotNull(frameworkContext, "frameworkContext");
     Mandate.ParameterNotNull(bootstrapper, "bootstrapper");
     Mandate.ParameterNotNull(providerMetadata, "providerMetadata");
 }
开发者ID:paulsuart,项目名称:rebelcmsxu5,代码行数:7,代码来源:ReadonlyProviderSetup.cs


示例7: IndexController

 public IndexController(IndexConfiguration configuration, IFrameworkContext frameworkContext)
 {
     Configuration = configuration;
     FrameworkContext = frameworkContext;
     _manualResetter = new ManualResetEvent(false);
     Queue = new IndexModificationQueue();
 }
开发者ID:RebelCMS,项目名称:rebelcmsxu5,代码行数:7,代码来源:IndexController.cs


示例8: EntityRepositoryFactory

 internal EntityRepositoryFactory(ProviderMetadata providerMetadata,
     AbstractRevisionRepositoryFactory<TypedEntity> revisionRepositoryFactory,
     AbstractSchemaRepositoryFactory schemaRepositoryFactory, Settings settings,
     IFrameworkContext frameworkContext)
     : base(providerMetadata, revisionRepositoryFactory, schemaRepositoryFactory, frameworkContext, new DependencyHelper(settings, providerMetadata))
 {
 }
开发者ID:paulsuart,项目名称:rebelcmsxu5,代码行数:7,代码来源:EntityRepositoryFactory.cs


示例9: AbstractProviderSetup

 public AbstractProviderSetup(ProviderMetadata providerMetadata, IFrameworkContext frameworkContext, AbstractProviderBootstrapper bootstrapper, int priorityOrdinal)
 {
     ProviderMetadata = providerMetadata;
     FrameworkContext = frameworkContext;
     Bootstrapper = bootstrapper;
     PriorityOrdinal = priorityOrdinal;
 }
开发者ID:paulsuart,项目名称:rebelcmsxu5,代码行数:7,代码来源:AbstractProviderSetup.cs


示例10: SchemaRepositoryFactory

 /// <summary>
 /// Constructor used for testing
 /// </summary>
 /// <param name="providerMetadata"></param>
 /// <param name="revisionRepositoryFactory"></param>
 /// <param name="frameworkContext"></param>
 /// <param name="helper"></param>
 internal SchemaRepositoryFactory(
     ProviderMetadata providerMetadata,
     AbstractRevisionRepositoryFactory<EntitySchema> revisionRepositoryFactory,
     IFrameworkContext frameworkContext,
     ExamineHelper helper)
     : base(providerMetadata, revisionRepositoryFactory, frameworkContext, new DependencyHelper(helper, providerMetadata))
 {
 }
开发者ID:RebelCMS,项目名称:rebelcmsxu5,代码行数:15,代码来源:SchemaRepositoryFactory.cs


示例11: NhFactoryHelper

 public NhFactoryHelper(Configuration config, ISession singleProvidedSession, bool leaveSessionOpenOnDispose, bool isSingleSessionFinalized, IFrameworkContext frameworkContext)
 {
     Config = config;
     SingleProvidedSession = singleProvidedSession;
     LeaveSessionOpenOnDispose = leaveSessionOpenOnDispose;
     IsSingleSessionFinalized = isSingleSessionFinalized;
     FrameworkContext = frameworkContext;
 }
开发者ID:RebelCMS,项目名称:rebelcmsxu5,代码行数:8,代码来源:NhFactoryHelper.cs


示例12: DevDatasetInstallTask

 public DevDatasetInstallTask(
     IFrameworkContext frameworkContext,
     IPropertyEditorFactory propertyEditorFactory,
     IHiveManager hiveManager,
     IAttributeTypeRegistry attributeTypeRegistry)
     : base(frameworkContext, hiveManager)
 {
     _devDataSet = new DevDataset(propertyEditorFactory, frameworkContext, attributeTypeRegistry);
 }
开发者ID:Joebeazelman,项目名称:rebelcmsxu5,代码行数:9,代码来源:DevDatasetInstallTask.cs


示例13: AbstractProviderRepository

        protected AbstractProviderRepository(ProviderMetadata providerMetadata, IFrameworkContext frameworkContext)
        {
            CanRead = true;
            ProviderMetadata = providerMetadata;
            FrameworkContext = frameworkContext;
            RepositoryScopedCache = new DictionaryScopedCache();

            //HiveContext = new RepositoryContext(RuntimeCacheProvider.Default, PerHttpRequestCacheProvider.Default, frameworkContext);
        }
开发者ID:Joebeazelman,项目名称:rebelcmsxu5,代码行数:9,代码来源:AbstractProviderRepository.cs


示例14: PublicAccessService

        public PublicAccessService(IHiveManager hive, IMembershipService<Member> membersMembershipService,
            IFrameworkContext framework)
        {
            Mandate.That<NullReferenceException>(hive != null);
            Mandate.That<NullReferenceException>(membersMembershipService != null);

            _hive = hive;
            _members = membersMembershipService;
            _framework = framework;
        }
开发者ID:paulsuart,项目名称:rebelcmsxu5,代码行数:10,代码来源:PublicAccessService.cs


示例15: ProviderMappingGroup

 public ProviderMappingGroup(string key,
     WildcardUriMatch singleMatch,
     ReadonlyProviderSetup singleReader,
     ProviderSetup singleWriter,
     IFrameworkContext frameworkContext)
     : this(key, Enumerable.Repeat(singleMatch, 1), Enumerable.Repeat(singleReader, 1), Enumerable.Repeat(singleWriter, 1), frameworkContext)
 {
     Mandate.ParameterNotNull(singleReader, "singleReader");
     Mandate.ParameterNotNull(singleWriter, "singleWriter");
 }
开发者ID:RebelCMS,项目名称:rebelcmsxu5,代码行数:10,代码来源:ProviderMappingGroup.cs


示例16: EntityRepositoryFactory

        //public SchemaRepositoryFactory MembershipSchemaRepositoryFactory { get { return base.SchemaRepositoryFactory as SchemaRepositoryFactory; } }

        /// <summary>
        /// Internal constructor for testing
        /// </summary>
        /// <param name="providerMetadata"></param>
        /// <param name="revisionRepositoryFactory"></param>
        /// <param name="schemaRepositoryFactory"></param>
        /// <param name="frameworkContext"></param>
        /// <param name="membershipProviders"></param>
        /// <param name="configuredProviders"></param>
        internal EntityRepositoryFactory(
            ProviderMetadata providerMetadata,
            AbstractRevisionRepositoryFactory<TypedEntity> revisionRepositoryFactory,
            AbstractSchemaRepositoryFactory schemaRepositoryFactory,
            IFrameworkContext frameworkContext,
            Lazy<IEnumerable<MembershipProvider>> membershipProviders,
            IEnumerable<ProviderElement> configuredProviders)
            : base(providerMetadata, revisionRepositoryFactory, schemaRepositoryFactory, frameworkContext, new DependencyHelper(configuredProviders, membershipProviders, providerMetadata))
        {
        }
开发者ID:paulsuart,项目名称:rebelcmsxu5,代码行数:21,代码来源:EntityRepositoryFactory.cs


示例17: DevDataset

        public DevDataset(IPropertyEditorFactory propertyEditorFactory, IFrameworkContext frameworkContext, IAttributeTypeRegistry attributeTypeRegistry)
        {
            _frameworkContext = frameworkContext;
            _attributeTypeRegistry = attributeTypeRegistry;
            PropertyEditorFactory = propertyEditorFactory;
            InitCreators();
            InitDataTypes();
            InitTemplates();
            InitDocTypes();
            _nodeData = XDocument.Parse(Files.umbraco);

        }
开发者ID:Joebeazelman,项目名称:rebelcmsxu5,代码行数:12,代码来源:DevDataset.cs


示例18: MapResolverContext

        /// <summary>
        /// Initializes a new instance of the <see cref="T:System.Object"/> class.
        /// </summary>
        public MapResolverContext(
            IFrameworkContext frameworkContext,
            IHiveManager hive, 
            IPropertyEditorFactory propertyEditorFactory,
            IParameterEditorFactory parameterEditorFactory)
        {
            ApplicationId = Guid.NewGuid();
            FrameworkContext = frameworkContext;
            Hive = hive;

            PropertyEditorFactory = propertyEditorFactory;
            ParameterEditorFactory = parameterEditorFactory;
        }
开发者ID:paulsuart,项目名称:rebelcmsxu5,代码行数:16,代码来源:MapResolverContext.cs


示例19: ProviderBootstrapper

        /// <summary>
        /// Initializes a new instance of the <see cref="ProviderBootstrapper"/> class if sufficient configuration information has been supplied by the user.
        /// </summary>
        /// <param name="existingConfig">The existing config.</param>
        /// <param name="examineManager"></param>
        /// <param name="frameworkContext"></param>
        /// <remarks></remarks>
        public ProviderBootstrapper(ProviderConfigurationSection existingConfig, ExamineManager examineManager, IFrameworkContext frameworkContext)
        {
            _existingConfig = existingConfig;
            _examineManager = examineManager;
            _frameworkContext = frameworkContext;

            //bind to all of the Examine events
            foreach (var i in _examineManager.IndexProviderCollection.OfType<BaseIndexProvider>())
            {
                i.IndexingError += (sender, e) => LogHelper.Error<Exception>("[Examine] " + e.Message, e.InnerException);
                i.IndexDeleted += (sender, e) => LogHelper.TraceIfEnabled<ExamineManager>("[Examine] Item {0} has been removed from the index", () => e.DeletedTerm.Value);
                i.NodeIndexed += (sender, e) => LogHelper.TraceIfEnabled<ExamineManager>("[Examine] Item {0} has been indexed", () => e.Item.Id);
            }
        }
开发者ID:RebelCMS,项目名称:rebelcmsxu5,代码行数:21,代码来源:ProviderBootstrapper.cs


示例20: NHibernateInMemoryRepository

        public NHibernateInMemoryRepository(IFrameworkContext fakeFrameworkContext, ISessionFactory sessionFactory = null, ISession sessionForTest = null)
        {
            using (DisposableTimer.TraceDuration<NHibernateInMemoryRepository>("Start setup", "End setup"))
            {
                if (sessionFactory == null && sessionForTest == null)
                {
                    var builder = new NHibernateConfigBuilder("data source=:memory:", "unit-tester",
                                                              SupportedNHDrivers.SqlLite, "thread_static", false);
                    var config = builder.BuildConfiguration();
                    _sessionFactory = config.BuildSessionFactory();
                    SessionForTest = _sessionFactory.OpenSession();

                    // See http://stackoverflow.com/questions/4325800/testing-nhibernate-with-sqlite-no-such-table-schema-is-generated
                    // and also http://nhforge.org/doc/nh/en/index.html#architecture-current-session
                    // regarding contextual sessions and GetCurrentSession()

                    // We pass in our own TextWriter because a bug in VS's testing framework means directly passing in Console.Out causes an ObjectDisposedException
                    new SchemaExport(config).Execute(false, true, false, SessionForTest.Connection, _schemaWriter);
                }
                else
                {
                    _sessionFactory = sessionFactory;
                    SessionForTest = sessionForTest;
                }

                _dataContextFactory = new DataContextFactory(fakeFrameworkContext, SessionForTest, true);

                // Create reader
                ReadOnlyUnitOfWorkFactory = new ReadOnlyUnitOfWorkFactory();
                _hiveReadProvider = new HiveReadProvider(new HiveProviderSetup(fakeFrameworkContext, "r-unit-tester", new FakeHiveProviderBootstrapper(), ReadOnlyUnitOfWorkFactory, null, _dataContextFactory));

                // Create writer
                ReadWriteUnitOfWorkFactory = new ReadWriteUnitOfWorkFactory();
                _writeProvider = new HiveReadWriteProvider(new HiveProviderSetup(fakeFrameworkContext, "rw-unit-tester", new FakeHiveProviderBootstrapper(), ReadOnlyUnitOfWorkFactory, ReadWriteUnitOfWorkFactory, _dataContextFactory));

                //setup nhibernate mappers
                var manualMapper = new ManualMapper(new NhLookupHelper(_dataContextFactory), _writeProvider);
                fakeFrameworkContext.TypeMappers.Add(new Lazy<AbstractTypeMapper, TypeMapperMetadata>(() => manualMapper, new TypeMapperMetadata(true)));


                // Create hive wrappers for the readers and writers
                var governorRUowFactory = new ReadOnlyUnitOfWorkFactoryWrapper(new[] { _hiveReadProvider });

                var governorRWUowFactory = new ReadWriteUnitOfWorkFactoryWrapper(new[] { _writeProvider });

                _hiveReadProviderViaGovernor = new Framework.Hive.PersistenceGovernor.HiveReadProvider(new HiveProviderSetup(fakeFrameworkContext, "r-unit-wrapper", new FakeHiveProviderBootstrapper(), governorRUowFactory, null, null), new[] { _hiveReadProvider });
                _hiveReadWriteProviderViaGovernor = new Framework.Hive.PersistenceGovernor.HiveReadWriteProvider(new HiveProviderSetup(fakeFrameworkContext, "rw-unit-wrapper", new FakeHiveProviderBootstrapper(), governorRUowFactory, governorRWUowFactory, null), new[] { _writeProvider });
            }
        }
开发者ID:RebelCMS,项目名称:rebelcmsxu5,代码行数:49,代码来源:NHibernateInMemoryRepository.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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