Exemplo n.º 1
0
        protected override void CopyFromThis(MethodClass obj)
        {
            base.CopyFromThis(obj);
            MethodOverride mo = (MethodOverride)obj;

            mo._baseIsAbstract = _baseIsAbstract;
            mo._baseMethodId   = _baseMethodId;
            mo._baseClassId    = _baseClassId;
        }
Exemplo n.º 2
0
 public override void OnPostSerialize(ObjectIDmap objMap, XmlNode objectNode, bool saved, object serializer)
 {
     if (saved)
     {
         XmlUtil.SetAttribute(objectNode, XmlTags.XMLATT_MethodID, MemberId);
         XmlUtil.SetAttribute(objectNode, XmlTags.XMLATT_ClassID, ClassId);
     }
     else
     {
         UInt32 classId = XmlUtil.GetAttributeUInt(objectNode, XmlTags.XMLATT_ClassID);
         MemberId = XmlUtil.GetAttributeUInt(objectNode, XmlTags.XMLATT_MethodID);
         ClassPointer root = RootPointer;
         if (root == null)
         {
             throw new DesignerException("Owner class not set for base method [{0},{1}]", classId, MemberId);
         }
         if (classId == root.ClassId)
         {
             SetDeclarerDirect(root);
         }
         else
         {
             ClassPointer declarer = root.GetBaseClass(classId);
             if (declarer == null)
             {
                 throw new DesignerException("Base class not set for base method [{0},{1}]", classId, MemberId);
             }
             SetDeclarerDirect(declarer);
         }
         MethodOverride baseMethod = root.GetCustomMethodByBaseMethodId(classId, MemberId);
         if (baseMethod == null)
         {
             throw new DesignerException("Base method not found [{0},{1}]", classId, MemberId);
         }
         DataTypePointer[] dps = new DataTypePointer[baseMethod.ParameterCount];
         for (int i = 0; i < baseMethod.ParameterCount; i++)
         {
             dps[i] = baseMethod.Parameters[i];
         }
         ParametersMatch(dps);
         Parameters = baseMethod.Parameters;
     }
 }