本文整理汇总了C#中IUrlParser类的典型用法代码示例。如果您正苦于以下问题:C# IUrlParser类的具体用法?C# IUrlParser怎么用?C# IUrlParser使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IUrlParser类属于命名空间,在下文中一共展示了IUrlParser类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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
示例16: EditUrlManager
public EditUrlManager(IUrlParser parser, EditSection config)
{
this.parser = parser;
ManagementInterfaceUrl = config.Paths.ManagementInterfaceUrl.TrimEnd('/');
EditTreeUrl = config.Paths.EditTreeUrl;
EditItemUrl = config.Paths.EditItemUrl;
ImportLanguageItemUrl = config.Paths.ImportLanguageItemUrl;
UpdateLanguageItemUrl = config.Paths.UpdateLanguageItemUrl;
ExportLanguageItemUrl = config.Paths.ExportLanguageItemUrl;
EditInterfaceUrl = config.Paths.EditInterfaceUrl;
if (config.Legacy)
EditInterfaceUrl += "Content/";
NewItemUrl = config.Paths.NewItemUrl;
DeleteItemUrl = config.Paths.DeleteItemUrl;
defaultViewPreference = config.Versions.DefaultViewMode;
}
开发者ID:andy4711,项目名称:n2cms,代码行数:17,代码来源:EditUrlManager.cs
示例17: Deserialize
internal static ContentItem Deserialize(Importer importer, IUrlParser parser, string xml)
{
if (importer == null)
throw new ArgumentException("Importer cannot be null.", "importer");
if (parser == null)
throw new ArgumentException("Parser cannot be null.", "parser");
if (String.IsNullOrEmpty(xml))
return null; // nothing to deserialize
var journal = importer.Read(new StringReader(xml));
foreach (var link in journal.UnresolvedLinks.Where(ul => ul.IsChild == false))
{
var item = importer.Persister.Get(link.ReferencedItemID);
if (item != null)
link.Setter(item);
}
if (journal.ReadItems == null)
throw new Exception("Journal couldn't read items due to journal.ReadItems == null. " + xml);
try
{
foreach (var item in journal.ReadItems)
(item as IInjectable<IUrlParser>).Set(parser);
}
catch (NullReferenceException nilX)
{
throw new Exception("Ran into a null reference while attempting to read items from the journal: " + xml, nilX);
}
if (journal.RootItem == null)
return null;
if (journal.RootItem.VersionOf.HasValue && journal.RootItem.VersionOf.Value != null)
journal.RootItem.Parent = journal.RootItem.VersionOf.Parent;
ReorderBySortOrderRecursive(journal.RootItem);
return journal.RootItem;
}
开发者ID:Biswo,项目名称:n2cms,代码行数:42,代码来源:ContentVersion.cs
示例18: SetUp
public override void SetUp()
{
base.SetUp();
CreatePersister();
parser = mocks.StrictMock<IUrlParser>();
ITypeFinder typeFinder = CreateTypeFinder();
DefinitionBuilder builder = new DefinitionBuilder(new DefinitionMap(), typeFinder, new TransformerBase<IUniquelyNamed>[0], TestSupport.SetupEngineSection());
IItemNotifier notifier = mocks.DynamicMock<IItemNotifier>();
mocks.Replay(notifier);
var changer = new N2.Edit.Workflow.StateChanger();
activator = new ContentActivator(changer, notifier, new EmptyProxyFactory());
definitions = new DefinitionManager(new[] { new DefinitionProvider(builder) }, new ITemplateProvider[0], activator, changer, new DefinitionMap());
finder = new FakeItemFinder(() => Enumerable.Empty<ContentItem>());
integrityManger = new IntegrityManager(definitions, finder, parser);
IntegrityEnforcer enforcer = new IntegrityEnforcer(persister, integrityManger, activator);
enforcer.Start();
}
开发者ID:aiex,项目名称:n2cms,代码行数:20,代码来源:IntegrityTests.cs
示例19: SetUp
public override void SetUp()
{
base.SetUp();
finder = new FakeTypeFinder(typeof(XmlableItem).Assembly, typeof(XmlableItem), typeof(XmlableItem2));
notifier = mocks.Stub<IItemNotifier>();
mocks.Replay(notifier);
definitions = new DefinitionManager(
new DefinitionBuilder(
finder,
new EngineSection(),
new FakeEditUrlManager()),
new N2.Edit.Workflow.StateChanger(),
notifier,
new InterceptingProxyFactory());
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;
}))
.Repeat.Any();
mocks.Replay(parser);
persister = mocks.StrictMock<IPersister>();
persister.Save(null);
LastCall.IgnoreArguments().Repeat.Any();
mocks.Replay(persister);
}
开发者ID:spmason,项目名称:n2cms,代码行数:39,代码来源:SerializationTestsBase.cs
示例20: SetUp
public override void SetUp()
{
base.SetUp();
CreatePersister();
parser = mocks.StrictMock<IUrlParser>();
ITypeFinder typeFinder = CreateTypeFinder();
ContentTypeBuilder builder = new ContentTypeBuilder(typeFinder, new EditableHierarchyBuilder<IEditor>(),
new AttributeExplorer<IDisplayer>(), new AttributeExplorer<IEditor>(),
new AttributeExplorer<IContentProperty>(), new AttributeExplorer<IEditorContainer>());
IItemNotifier notifier = mocks.DynamicMock<IItemNotifier>();
mocks.Replay(notifier);
definitions = new ContentTypeManager(builder, notifier);
integrityManger = new IntegrityManager(definitions, parser, null, null);
IntegrityEnforcer enforcer = new IntegrityEnforcer(persister, integrityManger);
enforcer.Start();
}
开发者ID:dpawatts,项目名称:zeus,代码行数:19,代码来源:IntegrityTests.cs
注:本文中的IUrlParser类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论