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


C# IDefinitionManager类代码示例

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


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


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