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


C# Compilation.GetArchives方法代码示例

本文整理汇总了C#中Compilation.GetArchives方法的典型用法代码示例。如果您正苦于以下问题:C# Compilation.GetArchives方法的具体用法?C# Compilation.GetArchives怎么用?C# Compilation.GetArchives使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Compilation的用法示例。


在下文中一共展示了Compilation.GetArchives方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: RenderArchives

        private void RenderArchives(Compilation c, IHTMLElement parent, Action<string> UpdateLocation)
        {
            var AllTypes = default(IHTMLDiv);

            var AllTypesNamespaceLookup = new Dictionary<string, IHTMLDiv>();

            var GetAllTypesNamespaceContainer = default(Func<string, IHTMLDiv>);

            GetAllTypesNamespaceContainer =
                (Namespace) =>
                {
                    var ParentNamespace = Namespace.TakeUntilLastIfAny(".");

                    var ParentContainer = AllTypes;

                    if (ParentNamespace != Namespace)
                    {
                        ParentContainer = GetAllTypesNamespaceContainer(ParentNamespace);
                    }

                    if (!AllTypesNamespaceLookup.ContainsKey(Namespace))
                    {
                        AllTypesNamespaceLookup[Namespace] = AddNamespace(ParentContainer, null, Namespace.SkipUntilLastIfAny("."), UpdateLocation);
                    }

                    return AllTypesNamespaceLookup[Namespace];
                };

            {
                var tr = new TreeNode(() => new VistaTreeNodePage());

                tr.Text = "Class Viewer";
                tr.Element.ClosedImage = new ClassViewer();
                tr.Container.AttachTo(parent);

                var div = new IHTMLDiv().AttachTo(parent);

                div.style.fontFamily = ScriptCoreLib.JavaScript.DOM.IStyle.FontFamilyEnum.Verdana;


                var i = new References().AttachTo(div);

                i.style.verticalAlign = "middle";
                i.style.marginRight = "0.5em";

                new IHTMLSpan { innerText = "All Types" }.AttachTo(div);

                var children = new IHTMLDiv().AttachTo(parent);

                children.style.paddingLeft = "1em";

                AllTypes = children;
            }

            var LoadActionList = new List<Action<Action>>();

            var Archives = c.GetArchives();

            foreach (var Archive in Archives)
            {
                Console.WriteLine(new { Archive.Name });

            }

            // lets not freeze our browser:P
            foreach (var item in Archives.ToArray())
            {
                var div = new IHTMLDiv().AttachTo(parent);

                div.style.fontFamily = ScriptCoreLib.JavaScript.DOM.IStyle.FontFamilyEnum.Verdana;


                var i = new References().AttachTo(div);

                i.style.verticalAlign = "middle";
                i.style.marginRight = "0.5em";

                new IHTMLSpan { innerText = item.Name }.AttachTo(div);

                var children = new IHTMLDiv().AttachTo(parent);

                children.style.paddingLeft = "1em";

                Console.WriteLine("before RenderAssemblies");
                RenderAssemblies(item, children, GetAllTypesNamespaceContainer, UpdateLocation, LoadActionList.Add);
                Console.WriteLine("after RenderAssemblies");
            }


            Console.WriteLine("before LoadActionList");
            LoadActionList.ForEach(
                (Current, Next) =>
                {
                    Console.WriteLine("before LoadActionList Next");
                    Current(Next);
                    Console.WriteLine("after LoadActionList Next");
                }
            );
        }
开发者ID:exaphaser,项目名称:JSC-Cross-Compiler,代码行数:99,代码来源:DocumentationCompilationViewer.cs


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