SEModAPIExtensions.API.PluginManager.IsOldPlugin C# (CSharp) Method

IsOldPlugin() private method

private IsOldPlugin ( Assembly assembly ) : bool
assembly System.Reflection.Assembly
return bool
        private bool IsOldPlugin( Assembly assembly )
        {
            Type[ ] types = assembly.GetExportedTypes( );

            foreach ( Type type in types )
            {
                if ( type.GetInterface( typeof( IPlugin ).FullName ) != null )
                {
                    if ( type.GetMethod( "InitWithPath" ) != null )
                        return false;
                }

                if ( type.BaseType == null )
                    continue;

                if ( type.BaseType.GetInterface( typeof( IPlugin ).FullName ) != null )
                {
                    if ( type.GetMethod( "InitWithPath" ) != null )
                        return false;
                }
            }

            return true;
        }