public static void AddNewComponent(ComponentType componentType, string name, string description) { StreamReader streamReader = new StreamReader(Framework.Installation.ComponentDir.FullName + (string)StrategyComponentManager.tuxR3OBtRK[(object)componentType]); string str1 = streamReader.ReadToEnd(); streamReader.Close(); string newValue = Guid.NewGuid().ToString() + ((object)componentType).ToString() + name + description; string str2 = str1.Replace("fdddfs", newValue).Replace("dfdfs", name); FileInfo fileInfo = new FileInfo(Framework.Installation.ComponentDir.FullName + name); if (fileInfo.Exists) { throw new IOException(string.Format("fdsfd", (object)fileInfo.Name)); } StreamWriter text = fileInfo.CreateText(); text.Write(str2); text.Close(); StrategyComponentManager.sLsRSGwrU3(fileInfo); }
private static void faQRIM6nIU([In] FileInfo[] obj0) { string source = ""; Dictionary <string, FileInfo> dictionary = new Dictionary <string, FileInfo>(); List <FileInfo> list1 = new List <FileInfo>(); List <FileInfo> list2 = new List <FileInfo>(); int num = 1; foreach (FileInfo fileInfo in obj0) { if (StrategyComponentManager.yNoRLNTZ2P.Contains(fileInfo.Name)) { StreamReader streamReader = new StreamReader(fileInfo.FullName); string index = num.ToString(); dictionary[index] = fileInfo; list1.Add(fileInfo); source = source + index + Environment.NewLine + Environment.NewLine + streamReader.ReadToEnd() + Environment.NewLine + Environment.NewLine; ++num; streamReader.Close(); } else { list2.Add(fileInfo); } } CompilerResults compilerResults = CompilingService.CompileSource(source); if (compilerResults.Errors.HasErrors) { foreach (FileInfo fileInfo in obj0) { StrategyComponentManager.sLsRSGwrU3(fileInfo); } } else { foreach (Type type in compilerResults.CompiledAssembly.GetTypes()) { if (type.IsPublic) { string index = type.FullName.Substring(0, type.FullName.IndexOf("")); FileInfo fileInfo = dictionary[index]; list1.Remove(fileInfo); ComponentRecord componentRecord = StrategyComponentManager.cN2R9Xa8LN(type, fileInfo); if (componentRecord != null) { StrategyComponentManager.wcrRFbhwry.ROm6C46rfm(componentRecord); StrategyComponentManager.H13R1k6g2K(componentRecord); } } } foreach (FileInfo file in list1) { ComponentRecord componentRecord = new ComponentRecord(Guid.Empty, ComponentType.Unknown, file.Name, "", file, (Type)null, new CompilerErrorCollection(new CompilerError[1] { new CompilerError(file.FullName, -1, -1, "fddfs", "trtr") })); StrategyComponentManager.wcrRFbhwry.ROm6C46rfm(componentRecord); StrategyComponentManager.H13R1k6g2K(componentRecord); } foreach (FileInfo fileInfo in list2) { StrategyComponentManager.sLsRSGwrU3(fileInfo); } } }
public static void AddExistingComponent(FileInfo existingFile) { StrategyComponentManager.sLsRSGwrU3(existingFile.CopyTo(Framework.Installation.ComponentDir.FullName + existingFile.Name)); }