コード例 #1
0
ファイル: SupportClasses.cs プロジェクト: wshanshan/DDD
        //public Create_ItemType(UnitType unit)
        //    : base(unit)
        //{
        //    Attributes = new List<AttributeSettingType>();
        //    base.eventType = "NewObject"; //not same as object type, used on Gabe's end.
        //}

        //public Create_ItemType(UnitType u, List<AttributeSettingType> atts) :
        //    base(u)
        //{
        //    Attributes = atts;
        //    base.eventType = "NewObject"; //not same as object type, used on Gabe's end.
        //}

        public void Add(string name, DataValue attr)
        {
            DataValue newAttr = new DataValue();

            newAttr = attr;

            Attributes[name] = newAttr;
        }
コード例 #2
0
ファイル: DataValues.cs プロジェクト: wshanshan/DDD
 public static string XMLSerialize(DataValue v)
 {
     if (v == null)
     {
         return "";
     }
     switch (v.dataType)
     {
         case "StringType":
             return ((StringValue)v).ToXML();
         case "DoubleType":
             return ((DoubleValue)v).ToXML();
         case "IntegerType":
             return ((IntegerValue)v).ToXML();
         case "LocationType":
             return ((LocationValue)v).ToXML();
         case "VelocityType":
             return ((VelocityValue)v).ToXML();
         case "AttributeCollectionType":
             return ((AttributeCollectionValue)v).ToXML();
         default:
             return "";
     }
 }
コード例 #3
0
ファイル: SupportClasses.cs プロジェクト: wshanshan/DDD
 public void addAttribute(string name, DataValue dv)
 {
     Attributes[name] = dv;
 }