當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。