/// <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));
 }
 /// <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"));
 }
 /// <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));
 }
 /// <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")));
 }
Beispiel #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);
 /// <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);
     }
 }
 /// <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);
 }
Beispiel #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);
     }
 }
Beispiel #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);
 }
Beispiel #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);