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


C# PEREffectiveConstraint.ToString方法代码示例

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


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

示例1: PrintSizeLengthHtml

        private static void PrintSizeLengthHtml(SizeableType pThis, PEREffectiveConstraint cns, StreamWriterLevel o, int p, string additonalConstraints)
        {
            string cssClass = "OddRow";
            long mnItems = pThis.minItems(cns);
            long mxItems = pThis.maxItems(cns);
            if (mnItems == mxItems)
                return;

            o.WriteLine("<tr class=\"" + cssClass + "\">");
            o.WriteLine("<td class=\"no\">1</td>");
            o.WriteLine("<td class=\"field\">Length</td>");
            //            if (mnItems!=mxItems)
            o.WriteLine("<td class=\"comment\">Special field used by PER to indicate the number of items present in the array.</td>");
            //            else
            //                o.WriteLine("<td class=\"comment\">Special field used by PER to indicate the number of items present in the array.In this case however, the length field requires zero bits because its value ({0}) is known in advanced by its size constraint.</td>", mxItems);

            o.WriteLine("<td class=\"type\">{0}</td>", "unsigned int");

            o.WriteLine("<td class=\"constraint\">{0}</td>", o.Constraint(cns.ToString() + additonalConstraints));
            o.WriteLine("<td class=\"min\">{0}</td>", pThis.minSizeBitsInPER(cns));
            o.WriteLine("<td class=\"max\">{0}</td>", (pThis.maxSizeBitsInPER(cns) == -1 ? "16<a href=\"#ARRAYS_SIZE_EXPLAINED123\"><span style=\"vertical-align: super\">why?</span></a>" : pThis.maxSizeBitsInPER(cns).ToString()));
            if (pThis.maxSizeBitsInPER(cns) == -1)
                DefaultBackend.m_HtmlLengthSizeMustBeExplained = true;
            o.WriteLine("</tr>");
        }
开发者ID:kia92798,项目名称:tinyasn1,代码行数:25,代码来源:ConstructedTypes.cs


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