示例#1
0
 /// <summary>
 ///   Adds the specified element.
 /// </summary>
 /// <param name = "element">The element.</param>
 private void Add(IPBXElement element)
 {
     if (this.Map.ContainsKey(element))
     {
         return;
     }
     this.Map.Add(element, this.GetElementUID(element));
 }
示例#2
0
 /// <summary>
 ///   Gets the element UID.
 /// </summary>
 /// <param name = "element">The element.</param>
 /// <returns></returns>
 private string GetElementUID(IPBXElement element)
 {
     return String.Format (CultureInfo.CurrentCulture, "{0}{1}", element.Nature.GetHashCode ().ToString ("X8"), element.GetHashCode ().ToString ("X16"));
 }
示例#3
0
 /// <summary>
 ///   Adds the specified element.
 /// </summary>
 /// <param name = "element">The element.</param>
 private void Add(IPBXElement element)
 {
     if (this.Map.ContainsKey (element)) {
         return;
     }
     this.Map.Add (element, this.GetElementUID (element));
 }
示例#4
0
 /// <summary>
 ///   Gets the element UID.
 /// </summary>
 /// <param name = "element">The element.</param>
 /// <returns></returns>
 private string GetElementUID(IPBXElement element)
 {
     return(String.Format(CultureInfo.CurrentCulture, "{0}{1}", element.Nature.GetHashCode().ToString("X8"), element.GetHashCode().ToString("X16")));
 }
示例#5
0
 /// <summary>
 /// Writes the PBX element prologue.
 /// </summary>
 /// <param name = "writer">The writer.</param>
 /// <param name = "indentLevel">The indent level.</param>
 /// <param name = "map">The map.</param>
 /// <param name = "element">The element.</param>
 /// <param name = "singleLine">Output result is on a single line.</param>
 public abstract void WritePBXElementPrologue(int indentLevel, IDictionary<IPBXElement, string> map, IPBXElement element, bool singleLine);
示例#6
0
 /// <summary>
 /// Writes the PBX element prologue.
 /// </summary>
 /// <param name = "writer">The writer.</param>
 /// <param name = "indentLevel">The indent level.</param>
 /// <param name = "map">The map.</param>
 /// <param name = "element">The element.</param>
 /// <param name = "singleLine">Output result is on a single line.</param>
 public override void WritePBXElementPrologue(int indentLevel, IDictionary<IPBXElement, string> map, IPBXElement element, bool singleLine)
 {
     this.WriteIndent (indentLevel);
     if (singleLine) {
         this.Write ("{0} /* {1} */ = {{", map [element], element.Description);
         this.Write (" {0} = {1}; ", "isa", element.Isa);
     } else {
         this.WriteLine ("{0} /* {1} */ = {{", map [element], element.Description);
         this.WriteIndent (indentLevel + 1);
         this.WriteLine ("{0} = {1};", "isa", element.Isa);
     }
 }
示例#7
0
 /// <summary>
 /// Writes the PBX element prologue.
 /// </summary>
 /// <param name = "writer">The writer.</param>
 /// <param name = "indentLevel">The indent level.</param>
 /// <param name = "map">The map.</param>
 /// <param name = "element">The element.</param>
 public override void WritePBXElementPrologue(int indentLevel, IDictionary<IPBXElement, string> map, IPBXElement element)
 {
     this.WritePBXElementPrologue (indentLevel, map, element, false);
 }
示例#8
0
 /// <summary>
 /// Writes the PBX element prologue.
 /// </summary>
 /// <param name = "writer">The writer.</param>
 /// <param name = "indentLevel">The indent level.</param>
 /// <param name = "map">The map.</param>
 /// <param name = "element">The element.</param>
 /// <param name = "singleLine">Output result is on a single line.</param>
 public override void WritePBXElementPrologue(int indentLevel, IDictionary <IPBXElement, string> map, IPBXElement element, bool singleLine)
 {
     this.WriteIndent(indentLevel);
     if (singleLine)
     {
         this.Write("{0} /* {1} */ = {{", map [element], element.Description);
         this.Write(" {0} = {1}; ", "isa", element.Isa);
     }
     else
     {
         this.WriteLine("{0} /* {1} */ = {{", map [element], element.Description);
         this.WriteIndent(indentLevel + 1);
         this.WriteLine("{0} = {1};", "isa", element.Isa);
     }
 }
示例#9
0
 /// <summary>
 /// Writes the PBX element prologue.
 /// </summary>
 /// <param name = "writer">The writer.</param>
 /// <param name = "indentLevel">The indent level.</param>
 /// <param name = "map">The map.</param>
 /// <param name = "element">The element.</param>
 public override void WritePBXElementPrologue(int indentLevel, IDictionary <IPBXElement, string> map, IPBXElement element)
 {
     this.WritePBXElementPrologue(indentLevel, map, element, false);
 }
示例#10
0
 /// <summary>
 /// Writes the PBX element prologue.
 /// </summary>
 /// <param name = "writer">The writer.</param>
 /// <param name = "indentLevel">The indent level.</param>
 /// <param name = "map">The map.</param>
 /// <param name = "element">The element.</param>
 /// <param name = "singleLine">Output result is on a single line.</param>
 public abstract void WritePBXElementPrologue(int indentLevel, IDictionary <IPBXElement, string> map, IPBXElement element, bool singleLine);