本文整理汇总了C#中IXmlBBase类的典型用法代码示例。如果您正苦于以下问题:C# IXmlBBase类的具体用法?C# IXmlBBase怎么用?C# IXmlBBase使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
IXmlBBase类属于命名空间,在下文中一共展示了IXmlBBase类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: connectSons
public static void connectSons(IXmlBBase father, ICollection l)
{
if (l != null)
{
foreach (IXmlBBase item in l)
connectSon(father, item);
}
}
示例2: SetDefaultValue
/// <summary>
/// Sets the default values for the element provided as parameter
/// </summary>
/// <param name="model"></param>
public void SetDefaultValue(IXmlBBase model)
{
// We are creating a new element, notification about changes in that element
// are not necessary.
Util.DontNotify(() =>
{
// ReSharper disable once ConvertToLambdaExpression
visit(model, true);
});
}
示例3: performTest
private void performTest(XmlBBaseAcceptor acceptor,
String fname,
int count,
int inMem)
{
XmlBStringContext ctxt = new XmlBStringContext();
String b;
long start = 0; //System.currentTimeMillis();
if (!ctxt.readFile(fname))
{
System.Console.WriteLine("Could not open file : " +
fname);
return;
}
IXmlBBase[] el = new IXmlBBase[inMem];
try
{
int ptr = 0;
for (int i = 0; i < count; i++)
{
if (i % 1000 == 0)
System.Console.WriteLine("" + (i) + "/" + count);
el[ptr] = acceptor.genericAccept(ctxt);
ctxt.setPtr(0);
ptr++;
if (ptr >= el.Length)
ptr = 0;
}
long stop = 0;//System.currentTimeMillis();
System.Console.WriteLine("Done parsing. Total time: " +
(stop - start) + " millisecs Time/instance: " +
(stop - start) / count);
// System.Console.WriteLine (el[0].toString());
start = 0;//System.currentTimeMillis();
for (int i = 0; i < count; i++)
{
if (i % 1000 == 0)
System.Console.WriteLine("" + (i) + "/" + count);
b = el[0].ToString();
}
stop = 0;//System.currentTimeMillis();
System.Console.WriteLine("Done unparsing. Total time: " +
(stop - start) + " millisecs Time/instance: " +
(stop - start) / count);
}
catch (Exception)
{
ctxt.dumpError();
}
}
示例4: genericSave
public bool genericSave(IXmlBBase obj,
string fName)
{
FileStream fs;
StreamWriter pw;
fs = new FileStream(fName, FileMode.Create);
pw = new StreamWriter(fs);
genericUnParse(pw, obj);
pw.Flush();
fs.Close();
return true;
}
示例5: visit
public override void visit(IXmlBBase obj, bool visitSubNodes)
{
IGraphicalDisplay graphicalDisplay = obj as IGraphicalDisplay;
if (graphicalDisplay != null)
{
graphicalDisplay.X = -1;
graphicalDisplay.Y = -1;
graphicalDisplay.Width = 0;
graphicalDisplay.Height = 0;
graphicalDisplay.Hidden = false;
graphicalDisplay.Pinned = false;
}
base.visit(obj);
}
示例6: visit
/// <summary>
/// Cleans up the declared elements dictionaries
/// </summary>
/// <param name="obj"></param>
/// <param name="visitSubNodes"></param>
public override void visit(IXmlBBase obj, bool visitSubNodes)
{
ModelElement modelElement = obj as ModelElement;
if (modelElement != null && ClearCaches)
{
modelElement.ClearCache();
}
ISubDeclarator subDeclarator = obj as ISubDeclarator;
if (subDeclarator != null)
{
subDeclarator.InitDeclaredElements();
}
base.visit(obj, visitSubNodes);
}
示例7: subElements
/// <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 IXmlBBase[] subElements(IXmlBBase obj)
{
return ((XmlBBase ) obj).subElements();
}
示例8: dispatch
public override void dispatch(IXmlBBase obj, bool visitSubNodes)
{
if (obj == null){
return;
} // If
((XmlBBase)obj).dispatch(this, visitSubNodes);
}
示例9: removeElements
/// <summary>Part of the list interface for Elements
/// This deletion function removes an element from the
/// collection in Elements
/// If the object given in parameter is not found in the
/// the collection, this function does nothing.</summary>
/// <param name="obj">the object to remove</param>
public void removeElements(IXmlBBase obj)
{
int idx = indexOfElements(obj);
if (idx >= 0) { deleteElements(idx);
NotifyControllers(null);
}
}
示例10: indexOfElements
/// <summary>Part of the list interface for Elements
/// This function returns the index of an element in
/// the collection.</summary>
/// <param name="el">the object to look for</param>
/// <returns>the index where it is found, or -1 if it is not.</returns>
public int indexOfElements(IXmlBBase el)
{
return ((System.Collections.IList) allElements()).IndexOf (el);
}
示例11: indexOfTranslations
/// <summary>Part of the list interface for Translations
/// This function returns the index of an element in
/// the collection.</summary>
/// <param name="el">the object to look for</param>
/// <returns>the index where it is found, or -1 if it is not.</returns>
public int indexOfTranslations(IXmlBBase el)
{
return ((System.Collections.IList) allTranslations()).IndexOf (el);
}
示例12: indexOfPreConditions
/// <summary>Part of the list interface for PreConditions
/// This function returns the index of an element in
/// the collection.</summary>
/// <param name="el">the object to look for</param>
/// <returns>the index where it is found, or -1 if it is not.</returns>
public int indexOfPreConditions(IXmlBBase el)
{
return ((System.Collections.IList) allPreConditions()).IndexOf (el);
}
示例13: removeSubSteps
/// <summary>Part of the list interface for SubSteps
/// This deletion function removes an element from the
/// collection in SubSteps
/// If the object given in parameter is not found in the
/// the collection, this function does nothing.</summary>
/// <param name="obj">the object to remove</param>
public void removeSubSteps(IXmlBBase obj)
{
int idx = indexOfSubSteps(obj);
if (idx >= 0) { deleteSubSteps(idx);
NotifyControllers(null);
}
}
示例14: indexOfFolders
/// <summary>Part of the list interface for Folders
/// This function returns the index of an element in
/// the collection.</summary>
/// <param name="el">the object to look for</param>
/// <returns>the index where it is found, or -1 if it is not.</returns>
public int indexOfFolders(IXmlBBase el)
{
return ((System.Collections.IList) allFolders()).IndexOf (el);
}
示例15: indexOfSourceTexts
/// <summary>Part of the list interface for SourceTexts
/// This function returns the index of an element in
/// the collection.</summary>
/// <param name="el">the object to look for</param>
/// <returns>the index where it is found, or -1 if it is not.</returns>
public int indexOfSourceTexts(IXmlBBase el)
{
return ((System.Collections.IList) allSourceTexts()).IndexOf (el);
}