예제 #1
0
        /// <summary>
        /// Gets the list of installed assemblies on the device for the current AppDomain.
        /// </summary>
        /// <returns></returns>
        public static MFAssemblyNames[] GetInstalledAssemblies()
        {
            if (s_InstalledAsms == null)
            {
                lock (typeof(MFAssemblyUpdate))
                {
                    if (s_InstalledAsms == null)
                    {
                        Assembly[] asms = AppDomain.CurrentDomain.GetAssemblies();
                        s_InstalledAsms = new MFAssemblyNames[asms.Length];

                        for (int i = 0, c = asms.Length; i < c; i++)
                        {
                            AssemblyName asmName = asms[i].GetName();

                            s_InstalledAsms[i] = new MFAssemblyNames(asmName.FullName, asmName.Version);
                        }
                    }
                }
            }

            return s_InstalledAsms;
        }
예제 #2
0
        /// <summary>
        /// Gets the list of installed assemblies on the device for the current AppDomain.
        /// </summary>
        /// <returns></returns>
        public static MFAssemblyNames[] GetInstalledAssemblies()
        {
            if (s_InstalledAsms == null)
            {
                lock (typeof(MFAssemblyUpdate))
                {
                    if (s_InstalledAsms == null)
                    {
                        Assembly[] asms = AppDomain.CurrentDomain.GetAssemblies();
                        s_InstalledAsms = new MFAssemblyNames[asms.Length];

                        for (int i = 0, c = asms.Length; i < c; i++)
                        {
                            AssemblyName asmName = asms[i].GetName();

                            s_InstalledAsms[i] = new MFAssemblyNames(asmName.FullName, asmName.Version);
                        }
                    }
                }
            }

            return(s_InstalledAsms);
        }