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


C# IUrlParser类代码示例

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


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

示例1: 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

示例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: SetUp

        public override void SetUp()
        {
            base.SetUp();

            finder = new FakeTypeFinder(typeof(XmlableItem).Assembly, typeof(XmlableItem), typeof(XmlableItem2));
            notifier = mocks.Stub<IItemNotifier>();
            mocks.Replay(notifier);

            activator = new ContentActivator(new N2.Edit.Workflow.StateChanger(), notifier, new InterceptingProxyFactory());
            definitions = new DefinitionManager(
                new[] {new DefinitionProvider(new DefinitionBuilder(new DefinitionMap(), 
                    finder, 
                    new TransformerBase<IUniquelyNamed>[0],
                    TestSupport.SetupEngineSection()))}, 
                activator, new StateChanger(), new DefinitionMap());
            definitions.Start();
            parser = mocks.StrictMock<IUrlParser>();
            Expect.On(parser)
                .Call(parser.BuildUrl(null))
                .IgnoreArguments()
                .Do(new BuildUrl(delegate(ContentItem itemToBuild)
                                    {
                                        string url = "/" + itemToBuild.Name + ".aspx";
                                        foreach (ContentItem parent in Find.EnumerateParents(itemToBuild, null))
                                        {
                                            if (parent.Parent != null)
                                                url = "/" + parent.Name + url;
                                        }
                                        return url.ToUrl();
                                    }))
                .Repeat.Any();
            mocks.Replay(parser);

            persister = TestSupport.SetupFakePersister();
        }
开发者ID:brianmatic,项目名称:n2cms,代码行数:35,代码来源:SerializationTestsBase.cs

示例4: CachingUrlParserDecorator

 public CachingUrlParserDecorator(IUrlParser inner, IPersister persister, IWebContext webContext, CacheWrapper cache)
 {
     this.inner = inner;
     this.persister = persister;
     this.webContext = webContext;
     this.cache = cache;
 }
开发者ID:GrimaceOfDespair,项目名称:n2cms,代码行数:7,代码来源:CachingUrlParserDecorator.cs

示例5: IntegrityManager

 public IntegrityManager(IContentTypeManager contentTypeManager, IUrlParser urlParser, ILanguageManager languageManager, AdminSection adminSection)
 {
     _contentTypeManager = contentTypeManager;
     _urlParser = urlParser;
     _languageManager = languageManager;
     _adminConfig = adminSection;
 }
开发者ID:dpawatts,项目名称:zeus,代码行数:7,代码来源:IntegrityManager.cs

示例6: ChildrenAjaxService

 public ChildrenAjaxService(AjaxRequestDispatcher dispatcher, Navigator navigator, VirtualNodeFactory nodes, IUrlParser urls)
 {
     this.dispatcher = dispatcher;
     this.navigator = navigator;
     this.nodes = nodes;
     this.urls = urls;
 }
开发者ID:AnonymousRetard,项目名称:n2cms,代码行数:7,代码来源:ChildrenAjaxService.cs

示例7: CachingUrlParserDecorator

 public CachingUrlParserDecorator(IUrlParser inner, IPersister persister, IWebContext webContext, CacheWrapper cache, HostSection config)
 {
     this.inner = inner;
     this.persister = persister;
     this.webContext = webContext;
     this.cache = cache;
     SlidingExpiration = config.OutputCache.SlidingExpiration ?? TimeSpan.FromMinutes(15);
 }
开发者ID:brianmatic,项目名称:n2cms,代码行数:8,代码来源:CachingUrlParserDecorator.cs

示例8: ContentVersionRepository

 public ContentVersionRepository(IRepository<ContentVersion> repository, Exporter exporter, Importer importer, IUrlParser parser, IProxyFactory proxyFactory)
 {
     this.Repository = repository;
     this.exporter = exporter;
     this.importer = importer;
     this.parser = parser;
     this.proxyFactory = proxyFactory;
 }
开发者ID:brianmatic,项目名称:n2cms,代码行数:8,代码来源:ContentVersionRepository.cs

示例9: 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

示例10: Process

        public void Process(IUrlParser parser, IEvaluator evaluator)
        {
            if (parser == null) throw new ArgumentNullException("parser");
            if (evaluator == null) throw new ArgumentNullException("evaluator");

            var words = parser.Parse(_url);
            var buzzwords = words.Where(evaluator.IsBuzzword);
            foreach (var buzzword in buzzwords)
            {
                ApplyEvent(new BuzzwordFoundEvent(buzzword));
            }
        }
开发者ID:michael-ell,项目名称:Buzz,代码行数:12,代码来源:Feed.cs

示例11: EditUrlManager

		public EditUrlManager(IUrlParser parser, EditSection config)
		{
            this.parser = parser;

			ManagementInterfaceUrl = config.Paths.ManagementInterfaceUrl.TrimEnd('/');
			EditTreeUrl = config.Paths.EditTreeUrl;
			EditItemUrl = config.Paths.EditItemUrl;
			EditInterfaceUrl = config.Paths.EditInterfaceUrl;
			NewItemUrl = config.Paths.NewItemUrl;
			DeleteItemUrl = config.Paths.DeleteItemUrl;
			defaultViewPreference = config.Versions.DefaultViewMode;
		}
开发者ID:alexjamesbrown,项目名称:n2cms,代码行数:12,代码来源:EditUrlManager.cs

示例12: SetUp

		public override void SetUp()
		{
			base.SetUp();

			parser = mocks.StrictMock<IUrlParser>();
			mocks.ReplayAll();

			IntegrityManager integrity = new IntegrityManager(definitions, persister.Repository, parser);
			IntegrityEnforcer enforcer = new IntegrityEnforcer(persister, integrity, activator);
			enforcer.Start();

			new BehaviorInvoker(persister, new N2.Definitions.Static.DefinitionMap()).Start();
		}
开发者ID:grbbod,项目名称:drconnect-jungo,代码行数:13,代码来源:PersisterIntegrityTests.cs

示例13: SetUp

		public override void SetUp()
		{
			base.SetUp();

			parser = mocks.StrictMock<IUrlParser>();
			mocks.ReplayAll();

			finder = new FakeItemFinder(() => Enumerable.Empty<ContentItem>());

			IntegrityManager integrity = new IntegrityManager(definitions, finder, parser);
			IntegrityEnforcer enforcer = new IntegrityEnforcer(persister, integrity, activator);
			enforcer.Start();

			new BehaviorInvoker(persister, new N2.Definitions.Static.DefinitionMap()).Start();
		}
开发者ID:navneetccna,项目名称:n2cms,代码行数:15,代码来源:PersisterIntegrityTests.cs

示例14: RequestPathProvider

 public RequestPathProvider(IWebContext webContext, IUrlParser parser, IErrorNotifier errorHandler, HostSection config)
 {
     this.webContext = webContext;
     this.parser = parser;
     this.errorHandler = errorHandler;
     observeAllExtensions = config.Web.ObserveAllExtensions;
     rewriteEmptyExtension = config.Web.ObserveEmptyExtension;
     StringCollection additionalExtensions = config.Web.ObservedExtensions;
     if (additionalExtensions != null && additionalExtensions.Count > 0)
     {
         observedExtensions = new string[additionalExtensions.Count + 1];
         additionalExtensions.CopyTo(observedExtensions, 1);
     }
     observedExtensions[0] = config.Web.Extension;
     nonRewritablePaths = config.Web.Urls.NonRewritable.GetPaths(webContext);
 }
开发者ID:AnonymousRetard,项目名称:n2cms,代码行数:16,代码来源:RequestPathProvider.cs

示例15: EditUrlManager

        public EditUrlManager(IUrlParser parser, EditSection config)
        {
            this.parser = parser;

            ManagementInterfaceUrl = config.Paths.ManagementInterfaceUrl.TrimEnd('/');
            EditTreeUrl = config.Paths.EditTreeUrl;
            EditItemUrl = config.Paths.EditItemUrl;
            EditInterfaceUrl = config.Paths.EditInterfaceUrl;
            if (config.Legacy)
                EditInterfaceUrl += "Content/";
            NewItemUrl = config.Paths.NewItemUrl;
            DeleteItemUrl = config.Paths.DeleteItemUrl;
            defaultViewPreference = config.Versions.DefaultViewMode;
            MediaBrowserUrl = config.Paths.MediaBrowserUrl;
            ensureLocalhostPreviewUrls = config.Paths.EnsureLocalhostPreviewUrls;
        }
开发者ID:EzyWebwerkstaden,项目名称:n2cms,代码行数:16,代码来源:EditUrlManager.cs


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