public static bool RebuildComponent(FileInfo file)
        {
            ComponentRecord[] array  = StrategyComponentManager.components.FindRecords(file);
            ComponentRecord[] array2 = array;
            for (int i = 0; i < array2.Length; i++)
            {
                ComponentRecord componentRecord = array2[i];
                componentRecord.SetErrors(new CompilerErrorCollection());
                StrategyComponentManager.componentCache.Remove(componentRecord);
            }
            CompilerResults compilerResults = CompilingService.Compile(file.FullName, false);

            if (compilerResults.Errors.HasErrors)
            {
                ComponentRecord[] array3 = array;
                for (int j = 0; j < array3.Length; j++)
                {
                    ComponentRecord componentRecord2 = array3[j];
                    componentRecord2.SetErrors(compilerResults.Errors);
                    StrategyComponentManager.EmitComponentReconstructed(componentRecord2);
                }
                return(false);
            }
            ArrayList arrayList = new ArrayList();

            Type[] types = compilerResults.CompiledAssembly.GetTypes();
            for (int k = 0; k < types.Length; k++)
            {
                Type            type             = types[k];
                ComponentRecord componentRecord3 = StrategyComponentManager.CreateRecord(type, file);
                if (componentRecord3 != null)
                {
                    arrayList.Add(componentRecord3);
                }
            }
            ArrayList arrayList2 = new ArrayList(array);

            foreach (ComponentRecord componentRecord4 in arrayList)
            {
                bool flag = false;
                foreach (ComponentRecord componentRecord5 in arrayList2)
                {
                    if (componentRecord5.GUID == componentRecord4.GUID)
                    {
                        componentRecord5.SetName(componentRecord4.Name);
                        componentRecord5.SetDescription(componentRecord4.Description);
                        componentRecord5.SetComponentType(componentRecord4.ComponentType);
                        componentRecord5.SetRuntimeType(componentRecord4.RuntimeType);
                        componentRecord5.SetIsChanged(false);
                        flag = true;
                        arrayList2.Remove(componentRecord5);
                        StrategyComponentManager.EmitComponentReconstructed(componentRecord5);
                        break;
                    }
                }
                if (!flag)
                {
                    StrategyComponentManager.components.Add(componentRecord4);
                    StrategyComponentManager.EmitComponentAdded(componentRecord4);
                }
            }
            foreach (ComponentRecord componentRecord6 in arrayList2)
            {
                if (componentRecord6.GUID == Guid.Empty)
                {
                    StrategyComponentManager.components.Remove(componentRecord6);
                    StrategyComponentManager.EmitComponentRemoved(componentRecord6);
                }
            }
            return(true);
        }