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

C# IDefinitionManager类代码示例

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

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



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

示例1: PopularityReordererScheduledAction

		public PopularityReordererScheduledAction(IDefinitionManager definitions, IPersister persister, IHost host, PopularityChildrenSorter sorter)
		{
			this.definitions = definitions;
			this.persister = persister;
			this.host = host;
			this.sorter = sorter;
		}
开发者ID:rukmareddy,项目名称:n2cms,代码行数:7,代码来源:PopularityReordererScheduledAction.cs


示例2: DiagnosticController

        public DiagnosticController(IContentItemRepository repository, IHost host, IDefinitionManager definitions,
            ILinkGenerator linkGenerator, IUrlParser parser, DatabaseSection config, IFlushable flushable, IReplicationStorage repstore, 
            IFileSystemFactory fileSystemFactory)
        {
            _repository = repository;
            _host = host;
            _definitions = definitions;
            _linkGenerator = linkGenerator;
            _parser = parser;
            _flushable = flushable;
            _tablePrefix = config.TablePrefix;

            _repstore = repstore;

            if (_forceWriteLockManager != null) return;

            // Create Force Write Lock Manager
            var storageConfig = (FileSystemNamespace) Enum.Parse(typeof (FileSystemNamespace),
                ConfigurationManager.AppSettings["AzureReplicationStorageContainerName"] ??
                "ReplicationStorageDebug");

            var fileSystem = fileSystemFactory.Create(storageConfig);
            _forceWriteLockManager = new ReplicationForceWriteLockManager(fileSystem);
            _writeLockManager = new ReplicationWriteLockManager(fileSystem);
        }
开发者ID:grbbod,项目名称:drconnect-jungo,代码行数:25,代码来源:DiagnosticController.cs


示例3: DirectUrlInjector

 public DirectUrlInjector(IHost host, IUrlParser parser, IContentItemRepository repository, IDefinitionManager definitions)
 {
     this.host = host;
     this.parser = parser;
     this.repository = repository;
     this.definitions = definitions;
 }
开发者ID:Biswo,项目名称:n2cms,代码行数:7,代码来源:DirectUrlInjector.cs


示例4: ControllerMapper

		public ControllerMapper(ITypeFinder typeFinder, IDefinitionManager definitionManager)
		{
			IList<ControlsAttribute> controllerDefinitions = FindControllers(typeFinder);
			foreach (ItemDefinition id in definitionManager.GetDefinitions())
			{
				IAdapterDescriptor controllerDefinition = GetControllerFor(id, controllerDefinitions);
				if(controllerDefinition != null)
				{
					ControllerMap[id.ItemType] = controllerDefinition.ControllerName;

					// interacting with static context is tricky, here I made the assumtion that the last
					// finder is the most relevat and takes the place of previous ones, this makes a few 
					// tests pass and doesn't seem to be called in production
					foreach (var finder in PathDictionary.GetFinders(id.ItemType).Where(f => f is ActionResolver))
						PathDictionary.RemoveFinder(id.ItemType, finder);

					// Use MVC's ReflectedControllerDescriptor to find all actions on the Controller
					var methods = new ReflectedControllerDescriptor(controllerDefinition.AdapterType)
						.GetCanonicalActions()
						.Select(m => m.ActionName).ToArray();
					var actionResolver = new ActionResolver(this, methods);

					_controllerActionMap[controllerDefinition.ControllerName] = methods;

					PathDictionary.PrependFinder(id.ItemType, actionResolver);
				}
			}
		}
开发者ID:grbbod,项目名称:drconnect-jungo,代码行数:28,代码来源:ControllerMapper.cs


示例5: GetDefinition

 public virtual ItemDefinition GetDefinition(IDefinitionManager definitions)
 {
     foreach (ItemDefinition definition in definitions.GetDefinitions())
         if (definition.Discriminator == ItemDiscriminator)
             return definition;
     return null;
 }
开发者ID:brianmatic,项目名称:n2cms,代码行数:7,代码来源:MagicLocation.cs


示例6: ItemXmlReader

		public ItemXmlReader(IDefinitionManager definitions, ContentActivator activator, IRepository<ContentItem> repository)
		{
			this.definitions = definitions;
			this.activator = activator;
			this.readers = DefaultReaders();
			this.repository = repository;
		}
开发者ID:meixger,项目名称:n2cms,代码行数:7,代码来源:ItemXmlReader.cs


示例7: LanguageInterceptor

 public LanguageInterceptor(IPersister persister, IDefinitionManager definitions, IWebContext context, ILanguageGateway gateway)
 {
     this.persister = persister;
     this.definitions = definitions;
     this.context = context;
     this.gateway = gateway;
 }
开发者ID:spmason,项目名称:n2cms,代码行数:7,代码来源:LanguageInterceptor.cs


示例8: Populate

        public override void Populate(IDefinitionManager definitionManager, IPlanet planet, IChunkColumn column00, IChunkColumn column10, IChunkColumn column01, IChunkColumn column11)
        {
            // Tree Definitions initialisieren
            if (treeDefinitions == null)
            {
                treeDefinitions = definitionManager.GetDefinitions<ITreeDefinition>().OrderBy(d => d.Order).ToArray();
                foreach (var treeDefinition in treeDefinitions)
                    treeDefinition.Init(definitionManager);
            }

            int salt = (column00.Index.X & 0xffff) + ((column00.Index.Y & 0xffff) << 16);
            Random random = new Random(planet.Seed + salt);

            Index3 sample = new Index3(column00.Index.X * Chunk.CHUNKSIZE_X, column00.Index.Y * Chunk.CHUNKSIZE_Y, column00.Heights[0, 0]);
            foreach (var treeDefinition in treeDefinitions)
            {
                int density = treeDefinition.GetDensity(planet, sample);
                if (density <= 0) continue;

                for (int i = 0; i < density; i++)
                {
                    int x = random.Next(Chunk.CHUNKSIZE_X / 2, Chunk.CHUNKSIZE_X * 3 / 2);
                    int y = random.Next(Chunk.CHUNKSIZE_Y / 2, Chunk.CHUNKSIZE_Y * 3 / 2);
                    int z = LocalBuilder.GetSurfaceHeight(column00, column10, column01, column11, x, y);

                    LocalBuilder builder = new LocalBuilder(x, y, z + 1, column00, column10, column01, column11);
                    treeDefinition.PlantTree(definitionManager, planet, new Index3(x, y, z), builder, random.Next(int.MaxValue));
                }
            }
        }
开发者ID:reicheltp,项目名称:octoawesome,代码行数:30,代码来源:TreePopulator.cs


示例9: SetUp

        public void SetUp()
        {
            parentDefinition = new ItemDefinition(typeof(DefinitionControllingParent)) { TemplateKey = "List" };
            childDefinition = new ItemDefinition(typeof(DefinitionOppressedChild)) { TemplateKey = "Wide" };

            definitions = MockRepository.GenerateStub<IDefinitionManager>();
            definitions.Expect(d => d.GetDefinitions()).Return(new[] { parentDefinition, childDefinition }).Repeat.Any();
        }
开发者ID:Jobu,项目名称:n2cms,代码行数:8,代码来源:AllowedDefinitionFilterTests.cs


示例10: FixZoneNamePartsMigration

		public FixZoneNamePartsMigration(IContentItemRepository repository, IDefinitionManager definitions)
		{
			this.repository = repository;
			this.definitions = definitions;

			Title = "Fixes zone name on parts with null zone name";
			Description = "In the database parts are defined by having a non-null ZoneName property. This migrations updates parts which have a null zone name and changes it to empty string.";
		}
开发者ID:nagarjunachallapalli,项目名称:n2cms,代码行数:8,代码来源:FixZoneNamePartsMigration.cs


示例11: EditableItemMigration

		public EditableItemMigration(IDefinitionManager definitions, IRepository<ContentItem> itemRepository)
		{
			this.definitions = definitions;
			this.itemRepository = itemRepository;

			Title = "Upgrade parts and pages using [EditableItem]";
			Description = "This migration will change the name of sub-items and remove the reference from the containing page.";
		}
开发者ID:rohancragg,项目名称:n2cms,代码行数:8,代码来源:EditableItemMigration.cs


示例12: AllowedBelow

 public static IEnumerable<TemplateDefinition> AllowedBelow(this IEnumerable<TemplateDefinition> allTemplates, ItemDefinition parentDefinition, ContentItem parentItem, IDefinitionManager definitions)
 {
     foreach (var template in allTemplates)
     {
         if (IsAllowed(template.Definition, parentItem, parentDefinition, definitions))
             yield return template;
     }
 }
开发者ID:timothyyip,项目名称:n2cms,代码行数:8,代码来源:DefinitionExtensions.cs


示例13: PartsModifyingAjaxService

 protected PartsModifyingAjaxService(Navigator navigator, IIntegrityManager integrity, IVersionManager versions, ContentVersionRepository versionRepository, IDefinitionManager definitionManager)
 {
     this.navigator = navigator;
     this.integrity = integrity;
     this.versions = versions;
     this.versionRepository = versionRepository;
     this.definitionManager = definitionManager;
 }
开发者ID:grbbod,项目名称:drconnect-jungo,代码行数:8,代码来源:PartsModifyingAjaxService.cs


示例14: CreateUrlProvider

 public CreateUrlProvider(IPersister persister, IEditUrlManager editUrlManager, IDefinitionManager definitions, AjaxRequestDispatcher dispatcher, Navigator navigator)
     : base(dispatcher)
 {
     this.persister = persister;
     this.editUrlManager = editUrlManager;
     this.definitions = definitions;
     this.navigator = navigator;
 }
开发者ID:spmason,项目名称:n2cms,代码行数:8,代码来源:CreateUrlProvider.cs


示例15: CreateUrlProvider

 public CreateUrlProvider(IPersister persister, IEditUrlManager editUrlManager, IDefinitionManager definitions, ContentActivator activator, Navigator navigator)
 {
     this.persister = persister;
     this.managementPaths = editUrlManager;
     this.definitions = definitions;
     this.activator = activator;
     this.navigator = navigator;
 }
开发者ID:amarwadi,项目名称:n2cms,代码行数:8,代码来源:CreateUrlProvider.cs


示例16: ConvertEnumsMigration

		public ConvertEnumsMigration(IRepository<ContentItem> repository, InstallationManager installer, IDefinitionManager definitions)
		{
			this.repository = repository;
			this.installer = installer;
			this.definitions = definitions;

			Title = "Convert enum detail types to new storage format";
			Description = "Enums values are stored as string (+ integer) in this version of N2. To support querying, previously stored enums must be converted.";
		}
开发者ID:meixger,项目名称:n2cms,代码行数:9,代码来源:ConvertEnumsMigration.cs


示例17: ItemXmlReader

		public ItemXmlReader(IDefinitionManager definitions, ContentActivator activator)
		{
			if (definitions == null)
				throw new ArgumentNullException("definitions");

			this.definitions = definitions;
			this.activator = activator;
			this.readers = DefaultReaders();
		}
开发者ID:JohnsonYuan,项目名称:n2cms,代码行数:9,代码来源:ItemXmlReader.cs


示例18: ItemXmlWriter

		public ItemXmlWriter(IDefinitionManager definitions, IUrlParser parser, IFileSystem fs)
		{
			if (definitions == null)
				throw new ArgumentNullException("definitions");

			this.definitions = definitions;
			this.parser = parser;
			this.fs = fs;
		}
开发者ID:grbbod,项目名称:drconnect-jungo,代码行数:9,代码来源:ItemXmlWriter.cs


示例19: InstallationManager

 public InstallationManager(IHost host, IDefinitionManager definitions, Importer importer, IPersister persister, ISessionProvider sessionProvider, IConfigurationBuilder configurationBuilder, IWebContext webContext)
 {
     this.host = host;
     this.definitions = definitions;
     this.importer = importer;
     this.persister = persister;
     this.sessionProvider = sessionProvider;
     this.configurationBuilder = configurationBuilder;
     this.webContext = webContext;
 }
开发者ID:spmason,项目名称:n2cms,代码行数:10,代码来源:InstallationManager.cs


示例20: CreateUrlProvider

 public CreateUrlProvider(IPersister persister, IEditUrlManager editUrlManager, IDefinitionManager definitions, ITemplateProvider[] templates, ContentActivator activator, AjaxRequestDispatcher dispatcher, Navigator navigator)
     : base(dispatcher)
 {
     this.persister = persister;
     this.managementPaths = editUrlManager;
     this.definitions = definitions;
     this.templates = templates;
     this.activator = activator;
     this.navigator = navigator;
 }
开发者ID:joaohortencio,项目名称:n2cms,代码行数:10,代码来源:CreateUrlProvider.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

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