本文整理汇总了C#中ISpawnProvider类的典型用法代码示例。如果您正苦于以下问题:C# ISpawnProvider类的具体用法?C# ISpawnProvider怎么用?C# ISpawnProvider使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ISpawnProvider类属于命名空间,在下文中一共展示了ISpawnProvider类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Initialise
/// <summary>
/// Initialise Fortis with a spawn provider and item factory and verifies the initialisation.
/// </summary>
/// <param name="spawnProvider"></param>
/// <param name="itemFactory"></param>
public static void Initialise(ISpawnProvider spawnProvider, IItemFactory itemFactory)
{
SpawnProvider = spawnProvider;
ItemFactory = itemFactory;
Verify();
}
示例2: Verify
/// <summary>
/// Verifies that Fortis has been correctly set up.
/// </summary>
/// <param name="itemFactory"></param>
/// <param name="spawnProvider"></param>
/// <param name="itemSearchFactory"></param>
public static void Verify(IItemFactory itemFactory, ISpawnProvider spawnProvider, IItemSearchFactory itemSearchFactory)
{
var verificationFailed = false;
var errorMessages = new StringBuilder();
errorMessages.AppendLine("Fortis intialise verification failed:");
errorMessages.AppendLine();
if (!VerifySpawnProvider(spawnProvider))
{
errorMessages.AppendLine("SpawnProvider is not initialised");
verificationFailed = true;
}
if (!VerifyItemFactory(itemFactory))
{
errorMessages.AppendLine("ItemFactory is not initialised");
verificationFailed = true;
}
if (!VerifyItemSearchFactory(itemSearchFactory))
{
errorMessages.AppendLine("ItemSearchFactory is not initialised");
verificationFailed = true;
}
if (verificationFailed)
{
throw new Exception(errorMessages.ToString());
}
}
示例3: FieldWrapper
public FieldWrapper(Field field, ISpawnProvider spawnProvider)
{
Sitecore.Diagnostics.Assert.ArgumentNotNull(field, "field");
_modified = false;
_field = field;
SpawnProvider = spawnProvider;
}
示例4: NameValueListFieldWrapper
public NameValueListFieldWrapper(string key, ref ItemWrapper item, ISpawnProvider spawnProvider, ArrayList value = null)
: base(key, ref item, string.Empty, spawnProvider)
{
if (value == null)
{
return;
}
_value = new NameValueCollection();
foreach (object val in value)
{
if (val is ArrayList)
{
var tmp = val as ArrayList;
_value.Add(tmp[0].ToString(), tmp[1].ToString());
}
}
this._rawValue = _value.ToString();
}
示例5: VerifySpawnProvider
/// <summary>
/// Verifies the spawn provider is correctly set up.
/// </summary>
/// <param name="spawnProvider"></param>
/// <returns></returns>
public static bool VerifySpawnProvider(ISpawnProvider spawnProvider)
{
return spawnProvider != null && spawnProvider.TemplateMapProvider != null;
}
示例6: RenderingParameterWrapper
public RenderingParameterWrapper(Dictionary<string, string> parameters, ISpawnProvider spawnProvider)
{
_parameters = parameters;
SpawnProvider = spawnProvider;
}
示例7: BooleanFieldWrapper
public BooleanFieldWrapper(string key, ref ItemWrapper item, ISpawnProvider spawnProvider, bool value)
: base(key, ref item, value ? "1" : "", spawnProvider)
{
_boolean = value;
}
示例8: OrderingOptions
public OrderingOptions(Dictionary<string, string> parameters, ISpawnProvider spawnProvider)
: base(parameters, spawnProvider)
{
}
示例9: RulesFieldWrapper
public RulesFieldWrapper(string key, ref ItemWrapper item, ISpawnProvider spawnProvider, string value = null)
: base(key, ref item, value, spawnProvider)
{
}
示例10: IntegerFieldWrapper
public IntegerFieldWrapper(string key, ref ItemWrapper item, ISpawnProvider spawnProvider, long value)
: base(key, ref item, value.ToString(), spawnProvider)
{
_value = value;
}
示例11: FieldWrapper
public FieldWrapper(string value, ISpawnProvider spawnProvider)
{
_value = value;
SpawnProvider = spawnProvider;
}
示例12: FileFieldWrapper
public FileFieldWrapper(Field field, ISpawnProvider spawnProvider)
: base(field, spawnProvider)
{
}
示例13: CallToActionListOptions
public CallToActionListOptions(Dictionary<string, string> parameters, ISpawnProvider spawnProvider)
: base(parameters, spawnProvider)
{
}
示例14: ContentPage
public ContentPage(Guid id, Dictionary<string, object> lazyFields, ISpawnProvider spawnProvider)
: base(id, lazyFields, spawnProvider)
{
}
示例15: NavigationLink
public NavigationLink(Item item, ISpawnProvider spawnProvider)
: base(item, spawnProvider)
{
_item = item;
}