Пример #1
0
        protected void GetMethods()
        {
            MethodInfo []methods = _systemType.GetMethods (AssemblyHelper.BINDING_FLAGS);
            bool import = true;

            foreach (MethodInfo mf in methods )
            {
                if (mf.IsFamily)
                {
                    import = _importer.ImportProtectedMethods;
                }
                else if (mf.IsPrivate)
                {
                    import = _importer.ImportPrivateMethods;
                }
                else if (mf.IsPublic)
                {
                    import = _importer.ImportPublicMethods;
                }

                if (mf.Name.IndexOf (".") > 0)
                {
                    //Interface...
                    //System.Console.WriteLine ("Is an interface! "+mf.Name);
                }
                else
                {
                    if (import)
                    {
                        AssemblyMethod method = new AssemblyMethod (_importer, _umlType, mf);

                        if (_dType == AssemblyDataStructureType.Class
                            || _dType == AssemblyDataStructureType.Struct)
                        {
                            ((Uml2.Class) _umlType).OwnedOperation.Add (method.Operation);
                        }
                        else if (_dType == AssemblyDataStructureType.DataType)
                        {
                            ((Uml2.PrimitiveType) _umlType).OwnedOperation.Add (method.Operation);
                        }
                    }
                }
                import = true;
            }
        }
Пример #2
0
 private void GetMethods()
 {
     MethodInfo []methods = _systemType.GetMethods (AssemblyHelper.BINDING_FLAGS);
     bool import = true;
     foreach (MethodInfo mf in methods )
     {
         if (mf.IsFamily)
         {
             import = _importer.ImportProtectedMethods;
         }
         else if (mf.IsPrivate)
         {
             import = _importer.ImportPrivateMethods;
         }
         else if (mf.IsPublic)
         {
             import = _importer.ImportPublicMethods;
         }
         if (import)
         {
             AssemblyMethod method = new AssemblyMethod (_importer, _umlType, mf);
             ((Uml2.Interface) _umlType).OwnedOperation.Add (method.Operation);
         }
         import = true;
     }
 }