本文整理汇总了C#中System.Web.Mvc.UrlHelper.GetUmbracoApiServiceBaseUrl方法的典型用法代码示例。如果您正苦于以下问题:C# UrlHelper.GetUmbracoApiServiceBaseUrl方法的具体用法?C# UrlHelper.GetUmbracoApiServiceBaseUrl怎么用?C# UrlHelper.GetUmbracoApiServiceBaseUrl使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Web.Mvc.UrlHelper
的用法示例。
在下文中一共展示了UrlHelper.GetUmbracoApiServiceBaseUrl方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ServerVariablesParser_Parsing
void ServerVariablesParser_Parsing(object sender, Dictionary<string, object> e)
{
if (HttpContext.Current == null) return;
var urlHelper = new UrlHelper(new RequestContext(new HttpContextWrapper(HttpContext.Current), new RouteData()));
var mainDictionary = new Dictionary<string, object>
{
{
"ocBaseUrl",
urlHelper.GetUmbracoApiServiceBaseUrl<ObjectController>(controller => controller.PostCreate(null))
},
{
"pecBaseUrl",
urlHelper.GetUmbracoApiServiceBaseUrl<PropertyEditorsApiController>(
controller => controller.GetAllTypes())
},
{
"fcBaseUrl",
urlHelper.GetUmbracoApiServiceBaseUrl<FieldApiController>(controller => controller.GetAllUsers())
}
};
if (!e.Keys.Contains("uioMatic"))
{
e.Add("uioMatic", mainDictionary);
}
}
示例2: ServerVariablesParserParsing
/// <summary>
/// The server variables parser parsing.
/// </summary>
/// <param name="sender">
/// The sender.
/// </param>
/// <param name="items">
/// The items.
/// </param>
private static void ServerVariablesParserParsing(object sender, Dictionary<string, object> items)
{
if (!items.ContainsKey("umbracoUrls"))
{
return;
}
var umbracoUrls = (Dictionary<string, object>) items["umbracoUrls"];
var url = new UrlHelper(new RequestContext(new HttpContextWrapper(HttpContext.Current), new RouteData()));
umbracoUrls.Add(
"gleanerSettingsApiBaseUrl",
url.GetUmbracoApiServiceBaseUrl<SettingsApiController>(
controller => controller.GetAllCountries()));
umbracoUrls.Add(
"gleanerAgentApiBaseUrl",
url.GetUmbracoApiServiceBaseUrl<AgentApiController>(
controller => controller.SearchAgents(new QueryDisplay
{
CurrentPage = 0,
ItemsPerPage = 25,
Parameters = new QueryDisplayParameter[] { }
})));
umbracoUrls.Add(
"gleanerMemberApiBaseUrl",
url.GetUmbracoApiServiceBaseUrl<MemberApiController>(
controller => controller.SearchMembers(new QueryDisplay
{
CurrentPage = 0,
ItemsPerPage = 25,
Parameters = new QueryDisplayParameter[] { }
})));
umbracoUrls.Add(
"gleanerFormApiBaseUrl",
url.GetUmbracoApiServiceBaseUrl<FormApiController>(
controller => controller.SearchForms(new QueryDisplay
{
CurrentPage = 0,
ItemsPerPage = 25,
Parameters = new QueryDisplayParameter[] { }
})));
umbracoUrls.Add(
"gleanerFormGroupApiBaseUrl",
url.GetUmbracoApiServiceBaseUrl<FormGroupApiController>(
controller => controller.SearchFormGroups(new QueryDisplay
{
CurrentPage = 0,
ItemsPerPage = 25,
Parameters = new QueryDisplayParameter[] { }
})));
}
示例3: ServerVariablesParser_Parsing
static void ServerVariablesParser_Parsing(object sender, Dictionary<string, object> e)
{
if (HttpContext.Current == null) throw new InvalidOperationException("HttpContext is null");
var urlHelper = new UrlHelper(new RequestContext(new HttpContextWrapper(HttpContext.Current), new RouteData()));
e.Add("articulate", new Dictionary<string, object>
{
{"articulateImportBaseUrl", urlHelper.GetUmbracoApiServiceBaseUrl<ArticulateBlogImportController>(controller => controller.PostImportBlogMl(null))},
{"articulatePropertyEditorsBaseUrl", urlHelper.GetUmbracoApiServiceBaseUrl<ArticulatePropertyEditorsController>(controller => controller.GetThemes())}
});
}
示例4: ServerVariablesParser_Parsing
void ServerVariablesParser_Parsing(object sender, Dictionary<string, object> e)
{
if (HttpContext.Current == null) return;
var urlHelper = new UrlHelper(new RequestContext(new HttpContextWrapper(HttpContext.Current), new RouteData()));
var mainDictionary = new Dictionary<string, object>();
mainDictionary.Add("demoBaseUrl", urlHelper.GetUmbracoApiServiceBaseUrl<PeopleApiController>(controller => controller.GetAll()));
if (!e.Keys.Contains("demoSection"))
{
e.Add("demoSection", mainDictionary);
}
}
示例5: ServerVariablesParser_Parsing
void ServerVariablesParser_Parsing(object sender, Dictionary<string, object> dictionary)
{
if (HttpContext.Current == null) throw new InvalidOperationException("HttpContext is null");
var urlHelper = new UrlHelper(new RequestContext(new HttpContextWrapper(HttpContext.Current), new RouteData()));
var url = urlHelper.GetUmbracoApiServiceBaseUrl<RelationsApiController>("GetRelations");
dictionary.Add("arknuRelations", new Dictionary<string, object>
{
{"relationsApiBase", url}
});
}
示例6: ServerVariablesParser_Parsing
void ServerVariablesParser_Parsing(object sender, Dictionary<string, object> e)
{
if (HttpContext.Current == null) return;
var urlHelper = new UrlHelper(new RequestContext(new HttpContextWrapper(HttpContext.Current), new RouteData()));
var mainDictionary = new Dictionary<string, object>
{
{
"apiBaseUrl",
urlHelper.GetUmbracoApiServiceBaseUrl<VortoApiController>(
controller => controller.GetInstalledLanguages())
}
};
if (!e.Keys.Contains("vorto"))
{
e.Add("vorto", mainDictionary);
}
}
示例7: Parsing
private void Parsing(object sender, Dictionary<string, object> e)
{
if (HttpContext.Current == null) throw new InvalidOperationException("HttpContext is null");
var urlHelper = new UrlHelper(new RequestContext(new HttpContextWrapper(HttpContext.Current), new RouteData()));
var mainDictionary = new Dictionary<string, object>();
mainDictionary.Add("calendarBaseUrl", urlHelper.GetUmbracoApiServiceBaseUrl<CalendarApiController>(controller => controller.PostSave(null)));
mainDictionary.Add("locationBaseUrl", urlHelper.GetUmbracoApiServiceBaseUrl<LocationApiController>(controller => controller.PostSave(null)));
mainDictionary.Add("eventBaseUrl", urlHelper.GetUmbracoApiServiceBaseUrl<EventApiController>(controller => controller.PostSave(null)));
mainDictionary.Add("reventBaseUrl", urlHelper.GetUmbracoApiServiceBaseUrl<REventApiController>(controller => controller.PostSave(null)));
mainDictionary.Add("userBaseUrl", urlHelper.GetUmbracoApiServiceBaseUrl<UserApiController>(controller => controller.PostSave(null)));
mainDictionary.Add("importBaseUrl", urlHelper.GetUmbracoApiServiceBaseUrl<ImportApiController>(controller => controller.Import()));
if (!e.Keys.Contains("eventCalendar"))
{
e.Add("eventCalendar", mainDictionary);
}
}
示例8: ServerVariablesParserParsing
private static void ServerVariablesParserParsing(object sender, Dictionary<string, object> items)
{
if (!items.ContainsKey("umbracoUrls")) return;
var umbracoUrls = (Dictionary<string, object>)items["umbracoUrls"];
var url = new UrlHelper(new RequestContext(new HttpContextWrapper(HttpContext.Current), new RouteData()));
umbracoUrls.Add("merchelloProductApiBaseUrl", url.GetUmbracoApiServiceBaseUrl<ProductApiController>(
controller => controller.GetAllProducts()));
umbracoUrls.Add("merchelloProductVariantsApiBaseUrl", url.GetUmbracoApiServiceBaseUrl<ProductVariantApiController>(
controller => controller.GetProductVariant(Guid.NewGuid())));
umbracoUrls.Add("merchelloSettingsApiBaseUrl", url.GetUmbracoApiServiceBaseUrl<SettingsApiController>(
controller => controller.GetAllCountries()));
umbracoUrls.Add("merchelloWarehouseApiBaseUrl", url.GetUmbracoApiServiceBaseUrl<WarehouseApiController>(
controller => controller.GetDefaultWarehouse()));
umbracoUrls.Add("merchelloCatalogShippingApiBaseUrl", url.GetUmbracoApiServiceBaseUrl<CatalogShippingApiController>(
controller => controller.GetShipCountry(Guid.NewGuid())));
umbracoUrls.Add("merchelloCatalogFixedRateShippingApiBaseUrl", url.GetUmbracoApiServiceBaseUrl<CatalogFixedRateShippingApiController>(
controller => controller.GetAllShipCountryFixedRateProviders(Guid.NewGuid())));
umbracoUrls.Add("merchelloPaymentGatewayApiBaseUrl", url.GetUmbracoApiServiceBaseUrl<PaymentGatewayApiController>(
controller => controller.GetAllGatewayProviders()));
umbracoUrls.Add("merchelloTaxationGatewayApiBaseUrl", url.GetUmbracoApiServiceBaseUrl<TaxationGatewayApiController>(
controller => controller.GetAllGatewayProviders()));
umbracoUrls.Add("merchelloInvoiceApiBaseUrl", url.GetUmbracoApiServiceBaseUrl<InvoiceApiController>(
controller => controller.GetAllInvoices()));
umbracoUrls.Add("merchelloOrderApiBaseUrl", url.GetUmbracoApiServiceBaseUrl<OrderApiController>(
controller => controller.GetOrder(Guid.NewGuid())));
umbracoUrls.Add("merchelloShipmentApiBaseUrl", url.GetUmbracoApiServiceBaseUrl<ShipmentApiController>(
controller => controller.GetShipment(Guid.NewGuid())));
umbracoUrls.Add("merchelloPaymentApiBaseUrl", url.GetUmbracoApiServiceBaseUrl<PaymentApiController>(
controller => controller.GetPayment(Guid.NewGuid())));
umbracoUrls.Add("merchelloGatewayProviderApiBaseUrl", url.GetUmbracoApiServiceBaseUrl<GatewayProviderApiController>(
controller => controller.GetGatewayProvider(Guid.NewGuid())));
}
示例9: ServerVariablesParserParsing
/// <summary>
/// Updates Umbraco's server variables collection with Merchello server variable values.
/// </summary>
/// <param name="sender">
/// The sender.
/// </param>
/// <param name="e">
/// The dictionary of server variables.
/// </param>
private static void ServerVariablesParserParsing(object sender, Dictionary<string, object> e)
{
if (HttpContext.Current == null) throw new InvalidOperationException("HttpContext is null");
if (e.ContainsKey("merchelloUrls")) return;
var merchelloUrls = new Dictionary<string, object>();
var url = new UrlHelper(new RequestContext(new HttpContextWrapper(HttpContext.Current), new RouteData()));
merchelloUrls.Add(
"merchelloAuditLogApiBaseUrl",
url.GetUmbracoApiServiceBaseUrl<AuditLogApiController>(
controller => controller.GetSalesHistoryByInvoiceKey(Guid.Empty)));
merchelloUrls.Add(
"merchelloBackOfficeCheckoutApiBaseUrl",
url.GetUmbracoApiServiceBaseUrl<BackOfficeCheckoutApiController>(
controller => controller.GetPaymentMethods()));
merchelloUrls.Add(
"merchelloCustomerApiBaseUrl",
url.GetUmbracoApiServiceBaseUrl<CustomerApiController>(
controller => controller.SearchCustomers(new QueryDisplay()
{
CurrentPage = 0,
ItemsPerPage = 25,
Parameters = new QueryDisplayParameter[] { }
})));
merchelloUrls.Add(
"merchelloDetachedContentApiBaseUrl",
url.GetUmbracoApiServiceBaseUrl<DetachedContentApiController>(
controller => controller.GetContentTypes()));
merchelloUrls.Add(
"merchelloEntityCollectionApiBaseUrl",
url.GetUmbracoApiServiceBaseUrl<EntityCollectionApiController>(
controller => controller.GetEntityCollectionProviders()));
merchelloUrls.Add(
"merchelloFixedRateShippingApiBaseUrl",
url.GetUmbracoApiServiceBaseUrl<FixedRateShippingApiController>(
controller => controller.GetShipFixedRateTable(new ShipMethodDisplay())));
merchelloUrls.Add(
"merchelloGatewayProviderApiBaseUrl",
url.GetUmbracoApiServiceBaseUrl<GatewayProviderApiController>(
controller => controller.GetGatewayProvider(Guid.NewGuid())));
merchelloUrls.Add(
"merchelloInvoiceApiBaseUrl",
url.GetUmbracoApiServiceBaseUrl<InvoiceApiController>(
controller => controller.SearchInvoices(new QueryDisplay()
{
CurrentPage = 0,
ItemsPerPage = 25,
Parameters = new QueryDisplayParameter[] { }
})));
merchelloUrls.Add(
"merchelloMarketingApiBaseUrl",
url.GetUmbracoApiServiceBaseUrl<MarketingApiController>(
controller => controller.GetAllOfferSettings()));
merchelloUrls.Add(
"merchelloNoteApiBaseUrl",
url.GetUmbracoApiServiceBaseUrl<NoteApiController>(
controller => controller.GetByEntityKey(Guid.Empty)));
merchelloUrls.Add(
"merchelloNotificationApiBaseUrl",
url.GetUmbracoApiServiceBaseUrl<NotificationGatewayApiController>(
controller => controller.GetAllGatewayProviders()));
merchelloUrls.Add(
"merchelloOrderApiBaseUrl",
url.GetUmbracoApiServiceBaseUrl<OrderApiController>(
controller => controller.GetOrder(Guid.NewGuid())));
merchelloUrls.Add(
"merchelloPaymentApiBaseUrl",
url.GetUmbracoApiServiceBaseUrl<PaymentApiController>(
controller => controller.GetPayment(Guid.NewGuid())));
merchelloUrls.Add(
"merchelloPaymentGatewayApiBaseUrl",
url.GetUmbracoApiServiceBaseUrl<PaymentGatewayApiController>(
controller => controller.GetAllGatewayProviders()));
merchelloUrls.Add(
//.........这里部分代码省略.........
示例10: ServerVariablesParserParsing
/// <summary>
/// The server variables parser parsing.
/// </summary>
/// <param name="sender">
/// The sender.
/// </param>
/// <param name="items">
/// The items.
/// </param>
private static void ServerVariablesParserParsing(object sender, Dictionary<string, object> items)
{
if (!items.ContainsKey("umbracoUrls")) return;
var umbracoUrls = (Dictionary<string, object>)items["umbracoUrls"];
var url = new UrlHelper(new RequestContext(new HttpContextWrapper(HttpContext.Current), new RouteData()));
umbracoUrls.Add(
"merchelloAuditLogApiBaseUrl",
url.GetUmbracoApiServiceBaseUrl<AuditLogApiController>(
controller => controller.GetSalesHistoryByInvoiceKey(Guid.Empty)));
umbracoUrls.Add(
"merchelloProductApiBaseUrl",
url.GetUmbracoApiServiceBaseUrl<ProductApiController>(
controller => controller.SearchProducts(new QueryDisplay()
{
CurrentPage = 0,
ItemsPerPage = 100,
Parameters = new QueryDisplayParameter[] { }
})));
//umbracoUrls.Add(
// "merchelloProductVariantsApiBaseUrl",
// url.GetUmbracoApiServiceBaseUrl<ProductVariantApiController>(
// controller => controller.GetProductVariant(Guid.NewGuid())));
umbracoUrls.Add(
"merchelloCustomerApiBaseUrl",
url.GetUmbracoApiServiceBaseUrl<CustomerApiController>(
controller => controller.SearchCustomers(new QueryDisplay()
{
CurrentPage = 0,
ItemsPerPage = 100,
Parameters = new QueryDisplayParameter[] { }
})));
umbracoUrls.Add(
"merchelloSettingsApiBaseUrl",
url.GetUmbracoApiServiceBaseUrl<SettingsApiController>(
controller => controller.GetAllCountries()));
umbracoUrls.Add(
"merchelloWarehouseApiBaseUrl",
url.GetUmbracoApiServiceBaseUrl<WarehouseApiController>(
controller => controller.GetDefaultWarehouse()));
umbracoUrls.Add(
"merchelloCatalogShippingApiBaseUrl",
url.GetUmbracoApiServiceBaseUrl<ShippingGatewayApiController>(
controller => controller.GetShipCountry(Guid.NewGuid())));
umbracoUrls.Add(
"merchelloNotificationApiBaseUrl",
url.GetUmbracoApiServiceBaseUrl<NotificationGatewayApiController>(
controller => controller.GetAllGatewayProviders()));
umbracoUrls.Add(
"merchelloPaymentGatewayApiBaseUrl",
url.GetUmbracoApiServiceBaseUrl<PaymentGatewayApiController>(
controller => controller.GetAllGatewayProviders()));
umbracoUrls.Add(
"merchelloTaxationGatewayApiBaseUrl",
url.GetUmbracoApiServiceBaseUrl<TaxationGatewayApiController>(
controller => controller.GetAllGatewayProviders()));
umbracoUrls.Add(
"merchelloInvoiceApiBaseUrl",
url.GetUmbracoApiServiceBaseUrl<InvoiceApiController>(
controller => controller.SearchInvoices(new QueryDisplay()
{
CurrentPage = 0,
ItemsPerPage = 100,
Parameters = new QueryDisplayParameter[] { }
})));
umbracoUrls.Add(
"merchelloOrderApiBaseUrl",
url.GetUmbracoApiServiceBaseUrl<OrderApiController>(
controller => controller.GetOrder(Guid.NewGuid())));
umbracoUrls.Add(
"merchelloShipmentApiBaseUrl",
url.GetUmbracoApiServiceBaseUrl<ShipmentApiController>(
controller => controller.GetShipment(Guid.NewGuid())));
umbracoUrls.Add(
"merchelloRateTableApiBaseUrl",
url.GetUmbracoApiServiceBaseUrl<FixedRateShippingApiController>(
//.........这里部分代码省略.........
示例11: ServerVariablesParserOnParsing
/// <summary>
/// The server variables parser on parsing.
/// </summary>
/// <param name="sender">
/// The sender.
/// </param>
/// <param name="e">
/// The dictionary.
/// </param>
private static void ServerVariablesParserOnParsing(object sender, Dictionary<string, object> e)
{
if (HttpContext.Current == null) throw new InvalidOperationException("HttpContext is null");
var urlHelper = new UrlHelper(new RequestContext(new HttpContextWrapper(HttpContext.Current), new RouteData()));
if (!e.ContainsKey("merchelloBazaarUrls"))
e.Add(
"merchelloBazaarUrls",
new Dictionary<string, object>()
{
{ "merchelloBazaarPropertyEditorsApiBaseUrl", urlHelper.GetUmbracoApiServiceBaseUrl<PropertyEditorsController>(controller => controller.GetThemes()) }
});
}
示例12: ServerVariablesParserOnParsing
/// <summary>
/// The server variables parser on parsing.
/// </summary>
/// <param name="sender">
/// The sender.
/// </param>
/// <param name="e">
/// The dictionary.
/// </param>
private static void ServerVariablesParserOnParsing(object sender, Dictionary<string, object> e)
{
if (HttpContext.Current == null) throw new InvalidOperationException("HttpContext is null");
if (e.ContainsKey("merchelloPaymentsUrls")) return;
var merchelloPaymentsUrls = new Dictionary<string, object>();
var url = new UrlHelper(new RequestContext(new HttpContextWrapper(HttpContext.Current), new RouteData()));
merchelloPaymentsUrls.Add(
"merchelloBraintreeApiBaseUrl",
url.GetUmbracoApiServiceBaseUrl<BraintreeApiController>(
controller => controller.GetClientRequestToken(Guid.Empty)));
e.Add("merchelloPaymentsUrls", merchelloPaymentsUrls);
}