本文整理汇总了C#中Bundle.GetType方法的典型用法代码示例。如果您正苦于以下问题:C# Bundle.GetType方法的具体用法?C# Bundle.GetType怎么用?C# Bundle.GetType使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Bundle
的用法示例。
在下文中一共展示了Bundle.GetType方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateExternalBundle
Bundle CreateExternalBundle(string url, Bundle referencer)
{
var bundleFactory = GetBundleFactory(referencer.GetType());
var externalBundle = bundleFactory.CreateExternalBundle(url);
externalBundle.Process(settings);
return externalBundle;
}
示例2: CreateExternalBundle
Bundle CreateExternalBundle(string reference, Bundle referencer, CassetteSettings settings)
{
var bundleFactory = GetBundleFactory(referencer.GetType());
var externalBundle = bundleFactory.CreateExternalBundle(reference);
externalBundle.Process(settings);
return externalBundle;
}
示例3: BuildBundleContent
public string BuildBundleContent(Bundle bundle, BundleContext context, IEnumerable<BundleFile> files)
{
var adHocBundle = bundle as AdHocBundle;
if (adHocBundle == null)
{
throw new ArgumentException(String.Format("The AdHocBundleBuilder is only meant to be used by an AdHocBundle. This one is called from a bundle of type '{0}'", bundle.GetType()), "bundle");
}
return adHocBundle.Content;
}
示例4: ProcessSingleBundle
protected Bundle ProcessSingleBundle(IFileHelper fileHelper, IDirectory directory, List<Bundle> bundlesToSort,
Dictionary<string, string> uncachedToCachedFiles, Bundle bundle, AssignHash hasher)
{
Trace.Source.TraceInformation("Processing {0} {1}", bundle.GetType().Name, bundle.Path);
//need to process early to generate an accurate hash.
if (IsCompositeBundle(bundle))
{
bundle.Process(settings);
}
else
{
hasher.Process(bundle, settings);
}
var bundleKey = CassetteSettings.bundles.GetSafeString(Encoding.Default.GetString(bundle.Hash));
if (CassetteSettings.bundles.ContainsKey(fileHelper, directory, uncachedToCachedFiles, bundleKey, bundle))
{
bundle = CassetteSettings.bundles.GetBundle(fileHelper, directory, uncachedToCachedFiles, bundleKey, bundle);
bundlesToSort.Add(bundle);
}
else
{
var unprocessedAssetPaths = CassetteSettings.bundles.GetAssetPaths(bundle);
if (!IsCompositeBundle(bundle))
{
bundle.Process(settings);
}
CassetteSettings.bundles.AddBundle(fileHelper, uncachedToCachedFiles, bundleKey, bundle, unprocessedAssetPaths);
}
return bundle;
}