本文整理汇总了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;
}
示例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);
}
示例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();
}
示例4: CachingUrlParserDecorator
public CachingUrlParserDecorator(IUrlParser inner, IPersister persister, IWebContext webContext, CacheWrapper cache)
{
this.inner = inner;
this.persister = persister;
this.webContext = webContext;
this.cache = cache;
}
示例5: IntegrityManager
public IntegrityManager(IContentTypeManager contentTypeManager, IUrlParser urlParser, ILanguageManager languageManager, AdminSection adminSection)
{
_contentTypeManager = contentTypeManager;
_urlParser = urlParser;
_languageManager = languageManager;
_adminConfig = adminSection;
}
示例6: ChildrenAjaxService
public ChildrenAjaxService(AjaxRequestDispatcher dispatcher, Navigator navigator, VirtualNodeFactory nodes, IUrlParser urls)
{
this.dispatcher = dispatcher;
this.navigator = navigator;
this.nodes = nodes;
this.urls = urls;
}
示例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);
}
示例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;
}
示例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;
}
示例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));
}
}
示例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;
}
示例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();
}
示例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();
}
示例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);
}
示例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;
}