当前位置: 首页>>代码示例>>C#>>正文


C# Bundle.GetType方法代码示例

本文整理汇总了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;
 }
开发者ID:nlerikheemskerk,项目名称:cassette,代码行数:7,代码来源:ExternalBundleGenerator.cs

示例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;
 }
开发者ID:JamesTryand,项目名称:cassette,代码行数:7,代码来源:BundleContainerFactoryBase.cs

示例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;
 }
开发者ID:mrbelk,项目名称:AspNetBundling,代码行数:9,代码来源:AdHocBundleBuilder.cs

示例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;
        }
开发者ID:Zocdoc,项目名称:cassette,代码行数:32,代码来源:BundleContainerFactoryBase.cs


注:本文中的Bundle.GetType方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。