Пример #1
0
 public static void RemoveComponent(ComponentRecord record)
 {
     record.File.Delete();
     StrategyComponentManager.wcrRFbhwry.fc56KRbFEA(record);
     StrategyComponentManager.gLhRsqD2VZ.Remove((object)record);
     StrategyComponentManager.IP7RCltgOJ(record);
 }
Пример #2
0
        public static bool RebuildComponent(FileInfo file)
        {
            ComponentRecord[] records = StrategyComponentManager.wcrRFbhwry.FindRecords(file);
            foreach (ComponentRecord componentRecord in records)
            {
                componentRecord.HrjA5j3PaA(new CompilerErrorCollection());
                StrategyComponentManager.gLhRsqD2VZ.Remove((object)componentRecord);
            }
            CompilerResults compilerResults = CompilingService.Compile(file.FullName, false);

            if (compilerResults.Errors.HasErrors)
            {
                foreach (ComponentRecord componentRecord in records)
                {
                    componentRecord.HrjA5j3PaA(compilerResults.Errors);
                    StrategyComponentManager.TXQRKdObj1(componentRecord);
                }
                return(false);
            }
            else
            {
                ArrayList arrayList1 = new ArrayList();
                foreach (Type type in compilerResults.CompiledAssembly.GetTypes())
                {
                    ComponentRecord componentRecord = StrategyComponentManager.cN2R9Xa8LN(type, file);
                    if (componentRecord != null)
                    {
                        arrayList1.Add((object)componentRecord);
                    }
                }
                ArrayList arrayList2 = new ArrayList((ICollection)records);
                foreach (ComponentRecord componentRecord1 in arrayList1)
                {
                    bool flag = false;
                    foreach (ComponentRecord componentRecord2 in arrayList2)
                    {
                        if (componentRecord2.GUID == componentRecord1.GUID)
                        {
                            componentRecord2.lfVAUUDxYN(componentRecord1.Name);
                            componentRecord2.x63AOXlRIK(componentRecord1.Description);
                            componentRecord2.CvyAHpcreG(componentRecord1.ComponentType);
                            componentRecord2.X8yAQiuh7R(componentRecord1.RuntimeType);
                            componentRecord2.VnhAiVxt7S(false);
                            flag = true;
                            arrayList2.Remove((object)componentRecord2);
                            StrategyComponentManager.TXQRKdObj1(componentRecord2);
                            break;
                        }
                    }
                    if (!flag)
                    {
                        StrategyComponentManager.wcrRFbhwry.ROm6C46rfm(componentRecord1);
                        StrategyComponentManager.H13R1k6g2K(componentRecord1);
                    }
                }
                foreach (ComponentRecord componentRecord in arrayList2)
                {
                    if (componentRecord.GUID == Guid.Empty)
                    {
                        StrategyComponentManager.wcrRFbhwry.fc56KRbFEA(componentRecord);
                        StrategyComponentManager.IP7RCltgOJ(componentRecord);
                    }
                }
                return(true);
            }
        }