本文整理汇总了C#中XmlBooster.XmlBContext类的典型用法代码示例。如果您正苦于以下问题:C# XmlBContext类的具体用法?C# XmlBContext怎么用?C# XmlBContext使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
XmlBContext类属于XmlBooster命名空间,在下文中一共展示了XmlBContext类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: acceptHistory
/// <summary>Top level function to parse an History from
/// a context. This kind of function is only made
/// available for elements marked as MAIN in the
/// metadefinition</summary>
/// <seealso cref="accept"/>
public static History acceptHistory(XmlBContext ctxt)
{
History res;
ctxt.skipWhiteSpace();
try {
ctxt.acceptString ("<History");
if (ctxt.isAlNum()){
ctxt.fail ("White space expected after TAG");
} // If
res = lAccept_History(ctxt, "</History>");
} catch (XmlBRecoveryException e) {
throw new XmlBException("Unexpected recovery exception: " +
e.ToString());
}
ctxt.close();
if (ctxt.errCount() > 0){
res = null;
throw new XmlBException (ctxt.errorMessage());
} // If
return res;
}
示例2: lAccept_Poly_Type
/// <remarks>This method is used by XMLBooster-generated code
/// internally. Please refrain from using it, as it
/// might produce unexpected results, and might change
/// or even disappear in the future.</remarks>
public static Type lAccept_Poly_Type(XmlBContext ctxt,
string endingTag)
{
char quoteChar;
Type res = null;
ctxt.skipWhiteSpace();
ctxt.acceptString ("xsi:type=");
quoteChar = ctxt.acceptQuote();
switch (ctxt.current()) {
case 'S':
{
ctxt.advance();
if (ctxt.lookAhead1('t')){
switch (ctxt.current()) {
case 'r':
{
ctxt.advance();
if (ctxt.lookAheadString("ucture")){
ctxt.accept(quoteChar);
res = lAccept_Structure(ctxt, endingTag);
} else {
res = null;
} // If
break;
} // Case
case 'a':
{
ctxt.advance();
if (ctxt.lookAheadString("teMachine")){
ctxt.accept(quoteChar);
res = lAccept_StateMachine(ctxt, endingTag);
} else {
res = null;
} // If
break;
} // Case
default:
res = null;
break;
} // Switch
} else {
res = null;
} // If
break;
} // Case
case 'R':
{
ctxt.advance();
if (ctxt.lookAheadString("ange")){
ctxt.accept(quoteChar);
res = lAccept_Range(ctxt, endingTag);
} else {
res = null;
} // If
break;
} // Case
case 'F':
{
ctxt.advance();
if (ctxt.lookAheadString("unction")){
ctxt.accept(quoteChar);
res = lAccept_Function(ctxt, endingTag);
} else {
res = null;
} // If
break;
} // Case
case 'E':
{
ctxt.advance();
if (ctxt.lookAhead3('n','u','m')){
ctxt.accept(quoteChar);
res = lAccept_Enum(ctxt, endingTag);
} else {
res = null;
} // If
break;
} // Case
case 'C':
{
ctxt.advance();
if (ctxt.lookAheadString("ollection")){
ctxt.accept(quoteChar);
res = lAccept_Collection(ctxt, endingTag);
} else {
res = null;
} // If
break;
} // Case
default:
res = null;
break;
} // Switch
return res;
}
示例3: parseBody
/// <remarks>This method is used by XMLBooster-generated code
/// internally. Please refrain from using it, as it
/// might produce unexpected results, and might change
/// or even disappear in the future.</remarks>
public override void parseBody(XmlBContext ctxt)
{
#pragma warning disable 0168, 0219
int indicator=0;
char quoteChar;
string tempStr;
#pragma warning restore 0168, 0219
bool fl896;
bool fl897;
PreCondition fl899;
bool fl910;
ctxt.skipWhiteSpace();
base.parseBody(ctxt);
ctxt.skipWhiteSpace();
// Optional Enclosed
if (ctxt.lookAheadOpeningTag("<Comment")){
ctxt.skipWhiteSpace();
fl896 = true ;
while (fl896) { // BeginLoop
ctxt.skipWhiteSpace();
if (ctxt.isAlNum()){
ctxt.skipTill ('=');
ctxt.advance();
ctxt.skipWhiteSpace();
quoteChar = ctxt.acceptQuote();
ctxt.skipTill (quoteChar);
ctxt.accept(quoteChar);
ctxt.skipWhiteSpace();
} else {
fl896 = false ;
} // If
} // While
ctxt.accept('>');
// Indicator
// Parse PC data
this.setComment(acceptor.lAcceptPcData(ctxt, -1, '<',XmlBContext.WS_PRESERVE));
// Regexp
ctxt.skipWhiteSpace();
ctxt.acceptString ("</Comment>");
} // If
// End enclosed
ctxt.skipWhiteSpace();
// Optional Enclosed
if (ctxt.lookAheadOpeningTag("<PreConditions")){
ctxt.skipWhiteSpace();
fl897 = true ;
while (fl897) { // BeginLoop
ctxt.skipWhiteSpace();
if (ctxt.isAlNum()){
ctxt.skipTill ('=');
ctxt.advance();
ctxt.skipWhiteSpace();
quoteChar = ctxt.acceptQuote();
ctxt.skipTill (quoteChar);
ctxt.accept(quoteChar);
ctxt.skipWhiteSpace();
} else {
fl897 = false ;
} // If
} // While
if (ctxt.current() == '/'){
ctxt.advance();
ctxt.accept('>');
} else {
ctxt.accept('>');
// Repeat
ctxt.skipWhiteSpace();
fl899 = null;
while(ctxt.lookAheadOpeningTag ("<PreCondition")) {
fl899 = acceptor.lAccept_PreCondition(ctxt, "</PreCondition>");
appendPreConditions(fl899);
ctxt.skipWhiteSpace();
} // -- monomorphic Loop
// EndRepeat
ctxt.skipWhiteSpace();
ctxt.acceptString ("</PreConditions>");
} // If
} // If
// End enclosed
ctxt.skipWhiteSpace();
// Enclosed
ctxt.acceptString ("<Expression");
if (ctxt.isAlNum()){
ctxt.fail ("White space expected after TAG");
} // If
ctxt.skipWhiteSpace();
fl910 = true ;
while (fl910) { // BeginLoop
ctxt.skipWhiteSpace();
if (ctxt.isAlNum()){
ctxt.skipTill ('=');
ctxt.advance();
ctxt.skipWhiteSpace();
quoteChar = ctxt.acceptQuote();
ctxt.skipTill (quoteChar);
//.........这里部分代码省略.........
示例4: lAcceptPcDataChr
/// <summary>Utility function which parse an entity character
/// as defined in the XMLBooster configuration.</summary>
/// <param name="ctxt">the context from which the data must be parsed</param>
static char lAcceptPcDataChr(XmlBContext ctxt)
{
char c = (char)0;
int indicator=0;
switch (ctxt.current()) {
case 'q':
{
ctxt.advance();
ctxt.acceptString ("uot;");
indicator = 2653;
break;
} // Case
case 'n':
{
ctxt.advance();
ctxt.acceptString ("bsp;");
indicator = 2652;
break;
} // Case
case 'l':
{
ctxt.advance();
ctxt.accept2('t',';');
indicator = 2650;
break;
} // Case
case 'g':
{
ctxt.advance();
ctxt.accept2('t',';');
indicator = 2651;
break;
} // Case
case 'a':
{
ctxt.advance();
switch (ctxt.current()) {
case 'p':
{
ctxt.advance();
ctxt.accept3('o','s',';');
indicator = 2654;
break;
} // Case
case 'm':
{
ctxt.advance();
ctxt.accept2('p',';');
indicator = 2649;
break;
} // Case
default:
ctxt.recoverableFail ("Other character expected (2662)");
break;
} // Switch
break;
} // Case
case '#':
{
ctxt.advance();
ctxt.accept('x');
indicator = 2655;
break;
} // Case
default:
ctxt.recoverableFail ("Other character expected (2664)");
break;
} // Switch
switch (indicator) {
case 2649: {
c = XMLB_AMPERSAND;
break;
} // End of dispatch label
case 2650: {
c = XMLB_LESS;
break;
} // End of dispatch label
case 2651: {
c = XMLB_GREATER;
break;
} // End of dispatch label
case 2652: {
c = XMLB_NBSP;
break;
} // End of dispatch label
case 2653: {
c = XMLB_QUOT;
break;
} // End of dispatch label
case 2654: {
c = XMLB_APOS;
break;
} // End of dispatch label
case 2655: {
c = (char) ctxt.acceptHexa();
ctxt.accept(';');
break;
//.........这里部分代码省略.........
示例5: lAccept_Variable
/// <remarks>This method is used by XMLBooster-generated code
/// internally. Please refrain from using it, as it
/// might produce unexpected results, and might change
/// or even disappear in the future.</remarks>
public static Variable lAccept_Variable(XmlBContext ctxt,
string endingTag)
{
if (endingTag == null) endingTag = "</Variable>";
Variable res = aFactory.createVariable();
res.parse(ctxt, endingTag);
return res;
}
示例6: lAccept_value
/// <remarks>This method is used by XMLBooster-generated code
/// internally. Please refrain from using it, as it
/// might produce unexpected results, and might change
/// or even disappear in the future.</remarks>
public static value lAccept_value(XmlBContext ctxt,
string endingTag)
{
value res = aFactory.createvalue();
res.parse(ctxt, endingTag);
return res;
}
示例7: lAccept_TranslationDictionary
/// <remarks>This method is used by XMLBooster-generated code
/// internally. Please refrain from using it, as it
/// might produce unexpected results, and might change
/// or even disappear in the future.</remarks>
public static TranslationDictionary lAccept_TranslationDictionary(XmlBContext ctxt,
string endingTag)
{
if (endingTag == null) endingTag = "</TranslationDictionary>";
TranslationDictionary res = aFactory.createTranslationDictionary();
res.parse(ctxt, endingTag);
return res;
}
示例8: lAccept_RuleDisabling
/// <remarks>This method is used by XMLBooster-generated code
/// internally. Please refrain from using it, as it
/// might produce unexpected results, and might change
/// or even disappear in the future.</remarks>
public static RuleDisabling lAccept_RuleDisabling(XmlBContext ctxt,
string endingTag)
{
if (endingTag == null) endingTag = "</RuleDisabling>";
RuleDisabling res = aFactory.createRuleDisabling();
res.parse(ctxt, endingTag);
return res;
}
示例9: lAccept_RuleCondition
/// <remarks>This method is used by XMLBooster-generated code
/// internally. Please refrain from using it, as it
/// might produce unexpected results, and might change
/// or even disappear in the future.</remarks>
public static RuleCondition lAccept_RuleCondition(XmlBContext ctxt,
string endingTag)
{
if (endingTag == null) endingTag = "</RuleCondition>";
RuleCondition res = aFactory.createRuleCondition();
res.parse(ctxt, endingTag);
return res;
}
示例10: lAccept_resolution_formula
/// <remarks>This method is used by XMLBooster-generated code
/// internally. Please refrain from using it, as it
/// might produce unexpected results, and might change
/// or even disappear in the future.</remarks>
public static resolution_formula lAccept_resolution_formula(XmlBContext ctxt,
string endingTag)
{
resolution_formula res = aFactory.createresolution_formula();
res.parse(ctxt, endingTag);
return res;
}
示例11: lAccept_RequirementSetReference
/// <remarks>This method is used by XMLBooster-generated code
/// internally. Please refrain from using it, as it
/// might produce unexpected results, and might change
/// or even disappear in the future.</remarks>
public static RequirementSetReference lAccept_RequirementSetReference(XmlBContext ctxt,
string endingTag)
{
if (endingTag == null) endingTag = "</RequirementSetReference>";
RequirementSetReference res = aFactory.createRequirementSetReference();
res.parse(ctxt, endingTag);
return res;
}
示例12: lAccept_RequirementSetDependancy
/// <remarks>This method is used by XMLBooster-generated code
/// internally. Please refrain from using it, as it
/// might produce unexpected results, and might change
/// or even disappear in the future.</remarks>
public static RequirementSetDependancy lAccept_RequirementSetDependancy(XmlBContext ctxt,
string endingTag)
{
if (endingTag == null) endingTag = "</RequirementSetDependancy>";
RequirementSetDependancy res = aFactory.createRequirementSetDependancy();
res.parse(ctxt, endingTag);
return res;
}
示例13: lAccept_Range
/// <remarks>This method is used by XMLBooster-generated code
/// internally. Please refrain from using it, as it
/// might produce unexpected results, and might change
/// or even disappear in the future.</remarks>
public static Range lAccept_Range(XmlBContext ctxt,
string endingTag)
{
if (endingTag == null) endingTag = "</Range>";
Range res = aFactory.createRange();
res.parse(ctxt, endingTag);
return res;
}
示例14: lAccept_Procedure
/// <remarks>This method is used by XMLBooster-generated code
/// internally. Please refrain from using it, as it
/// might produce unexpected results, and might change
/// or even disappear in the future.</remarks>
public static Procedure lAccept_Procedure(XmlBContext ctxt,
string endingTag)
{
if (endingTag == null) endingTag = "</Procedure>";
Procedure res = aFactory.createProcedure();
res.parse(ctxt, endingTag);
return res;
}
示例15: lAccept_SubStep
/// <remarks>This method is used by XMLBooster-generated code
/// internally. Please refrain from using it, as it
/// might produce unexpected results, and might change
/// or even disappear in the future.</remarks>
public static SubStep lAccept_SubStep(XmlBContext ctxt,
string endingTag)
{
if (endingTag == null) endingTag = "</SubStep>";
SubStep res = aFactory.createSubStep();
res.parse(ctxt, endingTag);
return res;
}