本文整理汇总了C#中PipelineArgs类的典型用法代码示例。如果您正苦于以下问题:C# PipelineArgs类的具体用法?C# PipelineArgs怎么用?C# PipelineArgs使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
PipelineArgs类属于命名空间,在下文中一共展示了PipelineArgs类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: SetControllerFactory
protected virtual void SetControllerFactory(PipelineArgs args)
{
var kernelFactory = new NinjectKernelFactory();
var ninjectControllerFactory = new NinjectControllerFactory(kernelFactory.Create());
var sitecoreControllerFactory = new SitecoreControllers.SitecoreControllerFactory(ninjectControllerFactory);
ControllerBuilder.Current.SetControllerFactory(sitecoreControllerFactory);
}
开发者ID:benchaikin,项目名称:testable-sitecore,代码行数:7,代码来源:InitializeNinjectControllerFactory.cs
示例2: Process
/// <summary>
/// Processes the specified arguments.
/// </summary>
/// <param name="args">The arguments.</param>
public virtual void Process(PipelineArgs args)
{
Assert.ArgumentNotNull(args, "args");
Order order = args.CustomData["order"] as Order;
if (order == null)
{
return;
}
BusinessCatalogSettings businnesCatalogSettings = Context.Entity.GetConfiguration<BusinessCatalogSettings>();
Item companyMasterData = Sitecore.Context.Database.SelectSingleItem(businnesCatalogSettings.CompanyMasterDataLink);
if (companyMasterData == null)
{
return;
}
string queryString = string.Format("orderid={0}&mode=mail", order.OrderNumber);
Item saleDepartment = companyMasterData.Children["Sale"];
var saleParams = new { Recipient = saleDepartment["Email"] };
IMail mailProvider = Context.Entity.Resolve<IMail>();
mailProvider.SendMail("Order Mail To Admin", saleParams, queryString);
}
开发者ID:HydAu,项目名称:sitecore8ecommerce,代码行数:29,代码来源:SendMailToAdmin.cs
示例3: Process
public void Process(PipelineArgs args)
{
if (Context.ClientPage.IsEvent)
{
return;
}
var current = HttpContext.Current;
if (current == null)
{
return;
}
var page = current.Handler as Page;
if (page == null)
{
return;
}
Assert.IsNotNull(page.Header, "Content Editor <head> tag is missing runat='value'");
var array = new [] { "/sitecore modules/Shell/MarkdownField/js/showdown.js" };
foreach (var text in array)
{
page.Header.Controls.Add(new LiteralControl("<script type='text/javascript' language='javascript' src='{0}'></script>".FormatWith(new object[]{ text })));
}
}
开发者ID:abhaydhar,项目名称:Sitecore-MarkdownField,代码行数:30,代码来源:InjectScripts.cs
示例4: Process
/// <summary>
/// Processes the specified arguments.
/// </summary>
/// <param name="args">The arguments.</param>
public virtual void Process(PipelineArgs args)
{
Assert.ArgumentNotNull(args, "args");
ShoppingCart shoppingCart = Context.Entity.GetInstance<ShoppingCart>();
PaymentProvider paymentProvider = Context.Entity.Resolve<PaymentProvider>(shoppingCart.PaymentSystem.Code);
PaymentUrlResolver paymentUrlResolver = new PaymentUrlResolver();
PaymentArgs paymentArgs = new PaymentArgs
{
ShoppingCart = shoppingCart,
PaymentUrls = paymentUrlResolver.Resolve(),
};
StringBuilder description = new StringBuilder();
foreach (ShoppingCartLine shoppingCartLine in shoppingCart.ShoppingCartLines)
{
description.Append(shoppingCartLine.Product.Title);
description.Append(", ");
}
paymentArgs.Description = description.ToString().Trim().TrimEnd(',');
paymentProvider.Invoke(shoppingCart.PaymentSystem, paymentArgs);
args.AbortPipeline();
}
开发者ID:HydAu,项目名称:sitecore8ecommerce,代码行数:31,代码来源:StartPayment.cs
示例5: Process
public void Process(PipelineArgs args)
{
RouteTable.Routes.MapRoute(
name: "Feature.Accounts.Api",
url: "api/accounts/{action}",
defaults:new {controller = "Accounts"});
}
开发者ID:robearlam,项目名称:Habitat,代码行数:7,代码来源:RegisterWebApiRoutes.cs
示例6: MapRoutes
protected virtual void MapRoutes(PipelineArgs args, RouteCollection routes)
{
var routeBase = Settings.GetSetting("Sitecore8.WebAPI.RouteBase", "api/");
routes.MapHttpRoute(
"ProductService-Get",
routeBase + "products/{id}",
new { controller = "Product", action = "Get" },
new { id = @"^\d+$" }
);
routes.MapHttpRoute(
"ProductService-GetAll",
routeBase + "products",
new { controller = "Product", action = "GetAll" }
);
routes.MapHttpRoute(
"TaxonomyService-GetCategories",
routeBase + "taxonomy/categories",
new { controller = "Taxonomy", action = "GetCategories" }
);
routes.MapHttpRoute(
"TaxonomyService-GetOptions",
routeBase + "taxonomy/categories/{parentID}",
new { controller = "Taxonomy", action = "GetOptions" }
);
routes.MapHttpRoute(
"TaxonomyService-TagItem",
routeBase + "taxonomy/tagItem/{itemID}",
new { controller = "Taxonomy", action = "TagItem" }
);
}
开发者ID:BIGANDYT,项目名称:arm-prototype,代码行数:35,代码来源:InitializeWebAPIRoutes.cs
示例7: Process
public void Process(PipelineArgs args)
{
Assert.ArgumentNotNull((object)args, "args");
IInsertRenderingArgs insertRenderingArgs = args as IInsertRenderingArgs;
if (insertRenderingArgs == null)
return;
Item renderingItem = insertRenderingArgs.RenderingItem;
Assert.IsNotNull((object)renderingItem, "renderingItem");
string placeholderKey = insertRenderingArgs.PlaceholderKey;
Assert.IsNotNullOrEmpty(placeholderKey, "placeholderKey");
string lastPart = StringUtil.GetLastPart(placeholderKey, '/', placeholderKey);
string[] arrKey = lastPart.Split(new char[] { '|' }, StringSplitOptions.RemoveEmptyEntries);
string lastPartKey = arrKey[0];
RenderingDefinition renderingDefinition = new RenderingDefinition()
{
ItemID = renderingItem.ID.ToString(),
Placeholder = lastPartKey
};
if (insertRenderingArgs.Datasource != null)
renderingDefinition.Datasource = insertRenderingArgs.Datasource.ID.ToString();
Assert.IsNotNull((object)insertRenderingArgs.Device, "device");
this.InsertRenderingAt(insertRenderingArgs.Device, renderingDefinition, insertRenderingArgs.Position, insertRenderingArgs.AllowedRenderingsIds, arrKey[1]);
insertRenderingArgs.Result = new RenderingReference(renderingDefinition, insertRenderingArgs.Language, insertRenderingArgs.ContentDatabase);
}
开发者ID:aiswebmaster,项目名称:SitecoreDynamicPlaceholdersMvc,代码行数:31,代码来源:InsertRendering.cs
示例8: Process
public void Process(PipelineArgs args)
{
if (Tracker.IsActive && Tracker.Current.Contact.Identifiers.IdentificationLevel != ContactIdentificationLevel.Known)
{
Tracker.Current.Session.Identify(this.UserName);
}
}
开发者ID:clone278,项目名称:sitecore-salesforce-connect,代码行数:7,代码来源:TestIdentity.cs
示例9: Process
/// <summary>
/// Processes the specified args.
/// </summary>
/// <param name="args">The args.</param>
public void Process(PipelineArgs args)
{
IUnityContainer container = args.CustomData["UnityContainer"] as IUnityContainer;
ShopContextFactory factory = container.Resolve<ShopContextFactory>();
container.RegisterType<ContextSwitcherDataSourceBase, ContentContextSwitcherDataSource>(new InjectionConstructor(factory));
}
开发者ID:HydAu,项目名称:sitecore8ecommerce,代码行数:11,代码来源:ConfigureUnityContainer.cs
示例10: Process
public void Process(PipelineArgs args)
{
var servicesConfig = GlobalConfiguration.Configuration;
var container = new Container(new IoC.Registry());
servicesConfig.DependencyResolver = new StructureMapDependencyResolver(container);
}
开发者ID:sobek85,项目名称:WindowsIoTSitecoreSSC,代码行数:7,代码来源:RegisterIoC.cs
示例11: Process
public void Process(PipelineArgs args)
{
if (Context.ClientPage.IsEvent)
{
return;
}
var context = HttpContext.Current;
if (context == null)
{
return;
}
var page = context.Handler as Page;
if (page == null)
{
return;
}
Assert.IsNotNull(page.Header, "Content Editor <head> tag is missing runat='value'");
var scripts = new[]
{
"/sitecore/shell/Controls/Lib/Scriptaculous/Scriptaculous.js",
"/sitecore/shell/Controls/Lib/Scriptaculous/builder.js",
"/sitecore/shell/Controls/Lib/Scriptaculous/effects.js",
"/sitecore/shell/Controls/Lib/Scriptaculous/dragdrop.js",
"/sitecore/shell/Controls/Lib/Scriptaculous/slider.js"
};
foreach (var script in scripts)
{
page.Header.Controls.Add(new LiteralControl("<script type='text/javascript' language='javascript' src='{0}'></script>".FormatWith(script)));
}
}
开发者ID:udt1106,项目名称:Sitecore-Item-Buckets,代码行数:35,代码来源:InjectScripts.cs
示例12: InitAuthenticationProvider
public virtual void InitAuthenticationProvider(PipelineArgs args)
{
AuthenticationManager.Provider.Name.Returns("mock");
var user = User.FromName(@"sitecore\Anonymous", false);
AuthenticationManager.Provider.GetActiveUser().Returns(user);
}
开发者ID:udalovas,项目名称:Sitecore.FakeDb,代码行数:7,代码来源:InitProviderMock.cs
示例13: Process
public void Process(PipelineArgs args)
{
RouteTable.Routes.MapRoute("Feature.Accounts.Api", "api/accounts/{action}", new
{
controller = "Accounts"
});
}
开发者ID:alinulms,项目名称:Habitat,代码行数:7,代码来源:RegisterWebApiRoutes.cs
示例14: Process
public void Process(PipelineArgs args)
{
RouteTable.Routes.MapRoute(
name: "Feature.Demo.Api",
url: "api/demo/{action}",
defaults: new { controller = "Demo" });
}
开发者ID:robearlam,项目名称:Habitat,代码行数:7,代码来源:RegisterWebApiRoutes.cs
示例15: Process
public virtual void Process(PipelineArgs args)
{
if (PipelineRun != null)
{
PipelineRun(this, new PipelineRunEventArgs(this.PipelineName, args));
}
}
开发者ID:udalovas,项目名称:Sitecore.FakeDb,代码行数:7,代码来源:PipelineWatcherProcessor.cs
示例16: Process
/// <summary>
/// Runs the processor.
/// </summary>
/// <param name="args">The arguments.</param>
public virtual void Process(PipelineArgs args)
{
Assert.ArgumentNotNull(args, "args");
User user = args.CustomData["user"] as User;
if (user == null)
{
Log.Error("The user is null", this);
return;
}
GeneralSettings generalSettings = Context.Entity.GetConfiguration<GeneralSettings>();
StringList roles = new StringList(generalSettings.DefaultCustomerRoles);
foreach (string role in roles)
{
if (Roles.RoleExists(role))
{
user.Roles.Add(Role.FromName(role));
}
else
{
Log.Warn(string.Format("Role: '{0}' does not exist", role), this);
}
}
}
开发者ID:HydAu,项目名称:sitecore8ecommerce,代码行数:30,代码来源:ConfigureSecurity.cs
示例17: Process
public void Process(PipelineArgs args)
{
if (MongoRestoreSettings.RestoreMongoDatabases && !this.mongoRestoreService.IsRestored("analytics"))
{
this.mongoRestoreService.RestoreDatabases();
}
}
开发者ID:kamsar,项目名称:Habitat,代码行数:7,代码来源:MongoRestoreProcessor.cs
示例18: Process
public void Process(PipelineArgs args)
{
RouteTable.Routes.MapRoute("Feature.Demo.Api", "api/demo/{action}", new
{
controller = "Demo"
});
}
开发者ID:alinulms,项目名称:Habitat,代码行数:7,代码来源:RegisterWebApiRoutes.cs
示例19: Process
/// <summary>
/// Processes this instance.
/// </summary>
/// <param name="pipelineArgs">The pipeline args.</param>
public void Process(PipelineArgs pipelineArgs)
{
CoreProcessor processor = new CoreProcessor();
bool isFakeProcessor = string.IsNullOrEmpty(this.processorDefinition.Type) && string.IsNullOrEmpty(this.processorDefinition.TypeReference);
if (!isFakeProcessor)
{
XmlDocument medium = new XmlDocument();
using (XmlReader reader = this.processorDefinition.ProcessorElement.CreateReader())
{
medium.Load(reader);
}
processor.Initialize(medium.DocumentElement);
}
EventHandler<RuntimeProcessorCallEventArgs> beforePipelineCalled = BeforePipelineProcessorCalled;
if (beforePipelineCalled != null)
{
beforePipelineCalled(this, new RuntimeProcessorCallEventArgs(this.pipelineName, this.pipelineDomain, this.processorIndex, this.processorDefinition, pipelineArgs));
}
if (!isFakeProcessor)
{
processor.Invoke(new object[] { pipelineArgs });
}
EventHandler<RuntimeProcessorCallEventArgs> afterPipelineCalled = AfterPipelineProcessorCalled;
if (afterPipelineCalled != null)
{
afterPipelineCalled(this, new RuntimeProcessorCallEventArgs(this.pipelineName, this.pipelineDomain, this.processorIndex, this.processorDefinition, pipelineArgs));
}
}
开发者ID:sergeyshushlyapin,项目名称:Sitecore.LiveTesting,代码行数:38,代码来源:ProcessorProxy.cs
示例20: Process
public void Process(PipelineArgs args)
{
RouteTable.Routes.MapRoute(
name: "Api",
url: "api/{controller}/{action}");
//GlobalConfiguration.Configure(WebApiConfig.Register);
}
开发者ID:mikeedwards83,项目名称:Habitat,代码行数:7,代码来源:RegisterWebApiRoutes.cs
注:本文中的PipelineArgs类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论