public BtsCatchShape(XmlReader reader)
     : base(reader)
 {
     while (reader.Read())
     {
         if (!reader.HasAttributes)
             break;
         if (reader.Name.Equals("om:Property"))
         {
             string valName = reader.GetAttribute("Name");
             string val = reader.GetAttribute("Value");
             if (!GetReaderProperties(valName, val))
             {
                 if (valName.Equals("ExceptionName"))
                     _excName = val;
                 else if (valName.Equals("ExceptionType"))
                     _excType = val;
                 else if (valName.Equals("IsFaultMessage"))
                     _fault = Convert.ToBoolean(val);
                 else if (valName.Equals("AnalystComments"))
                     _comments = val;
                 else
                 {
                     Debug.WriteLine("[BtsCatchShape.ctor] unhandled property " + valName);
                     Debugger.Break();
                 }
             }
         }
         else if (reader.Name.Equals("om:Element"))
             _comps.Add(BtsShapeFactory.CreateShape(reader.ReadSubtree()));
     }
     reader.Close();
 }
        public BtsTaskShape(XmlReader reader)
            : base(reader)
        {
            while (reader.Read())
            {
                if (reader.AttributeCount < 1)
                {
                    break;
                }
                if (reader.Name.Equals("om:Property"))
                {
                    string valName = reader.GetAttribute("Name");
                    string val     = reader.GetAttribute("Value");

                    if (!GetReaderProperties(valName, val))
                    {
                        if (valName.Equals("AnalystComments"))
                        {
                            _comments = val;
                        }
                        else
                        {
                            Debug.WriteLine("[BtsServiceBody.ctor] unhandled property " + valName);
                            Debugger.Break();
                        }
                    }
                }
                else if (reader.Name.Equals("om:Element"))
                {
                    _components.Add(BtsShapeFactory.CreateShape(reader.ReadSubtree()));
                }
            }
        }
Ejemplo n.º 3
0
 /// <summary>
 /// TimeoutExpression
 /// </summary>
 //internal string _timeoutExp;
 public BtsContainer(XmlReader reader) : base(reader)
 {
     while (reader.Read())
     {
         if (!reader.HasAttributes)
         {
             break;
         }
         if (reader.Name.Equals("om:Property"))
         {
             string valName = reader.GetAttribute("Name");
             string val     = reader.GetAttribute("Value");
             if (!GetReaderProperties(valName, val))
             {
                 if (valName.Equals("InitializedTransactionType"))
                 {
                     _initTxType = Convert.ToBoolean(val);
                 }
                 else if (valName.Equals("IsSynchronized"))
                 {
                     _sync = Convert.ToBoolean(val);
                 }
                 else if (valName.Equals("UseDefaultConstructor"))
                 {
                     _defCtor = Convert.ToBoolean(val);
                 }
                 else if (valName.Equals("AnalystComments"))
                 {
                     _comments = val;
                 }
                 //else if (valName.Equals("TimeoutExpression"))
                 //  _timeoutExp = val;
                 else
                 {
                     Debug.WriteLine("[BtsCatchShape.ctor] unhandled property " + valName);
                     Debugger.Break();
                 }
             }
         }
         else if (reader.Name.Equals("om:Element"))
         {
             _comps.Add(BtsShapeFactory.CreateShape(reader.ReadSubtree()));
         }
     }
     reader.Close();
 }
 public BtsTreeBranch(XmlReader reader)
     : base(reader)
 {
     while (reader.Read())
     {
         if (!reader.HasAttributes)
         {
             break;
         }
         if (reader.Name.Equals("om:Property"))
         {
             string valName = reader.GetAttribute("Name");
             string val     = reader.GetAttribute("Value");
             if (!GetReaderProperties(valName, val))
             {
                 if (valName.Equals("IsGhostBranch"))
                 {
                     _ghostBranch = Convert.ToBoolean(val);
                 }
                 else if (valName.Equals("Expression"))
                 {
                     _expression = val;
                 }
                 else if (valName.Equals("Name"))
                 {
                     _name = val;
                 }
                 else
                 {
                     Debug.WriteLine("[BtsDecisionBranchShape.ctor] unhandled property " + valName);
                     Debugger.Break();
                 }
             }
         }
         else if (reader.Name.Equals("om:Element"))
         {
             _shapes.Add(BtsShapeFactory.CreateShape(reader.ReadSubtree()));
         }
     }
     reader.Close();
 }
 public BtsWhileShape(XmlReader reader)
     : base(reader)
 {
     while (reader.Read())
     {
         if (!reader.HasAttributes)
         {
             break;
         }
         if (reader.Name.Equals("om:Property"))
         {
             string valName = reader.GetAttribute("Name");
             string val     = reader.GetAttribute("Value");
             if (!GetReaderProperties(valName, val))
             {
                 if (valName.Equals("Expression"))
                 {
                     _exp = val;
                 }
                 else if (valName.Equals("AnalystComments"))
                 {
                     _comments = val;
                 }
                 else
                 {
                     Debug.WriteLine("[BtsWhileShape.ctor] unhandled property " + valName);
                     Debugger.Break();
                 }
             }
         }
         else if (reader.Name.Equals("om:Element"))
         {
             _comps.Add(BtsShapeFactory.CreateShape(reader.ReadSubtree()));
         }
     }
     reader.Close();
 }