Esempio n. 1
0
 public static Object HandleIdentifier(KAOSMetaModelElement elm)
 {
     if (elm == null){
     return null;
       }
       return elm.GetType().GetProperty("Identifier").GetValue(elm, null);
 }
Esempio n. 2
0
        public static KAOSMetaModelElement OverrideKeys(this KAOSMetaModelElement o1, KAOSMetaModelElement o2)
        {
            if (string.IsNullOrEmpty (o1.Identifier))
                o1.Identifier = o2.Identifier;

            if (o1.GetType().GetProperty ("Name") != null
                && o2.GetType().GetProperty ("Name") != null
                && string.IsNullOrEmpty (o1.GetType ().GetProperty ("Name").GetValue (o1, null) as String))
                o1.GetType().GetProperty ("Name").SetValue (o1, o2.GetType().GetProperty ("Name").GetValue (o2, null), null);

            if (o1.GetType().GetProperty ("Signature") != null
                && o2.GetType().GetProperty ("Signature") != null
                && string.IsNullOrEmpty (o1.GetType ().GetProperty ("Signature").GetValue (o1, null) as String))
                o1.GetType().GetProperty ("Signature").SetValue (o1, o2.GetType().GetProperty ("Signature").GetValue (o2, null), null);

            return o1;
        }
Esempio n. 3
0
 public static bool HasIdentifier(KAOSMetaModelElement elm)
 {
     return elm.GetType().GetProperty("Identifier") != null;
 }