Ejemplo n.º 1
0
		private static string smethod_8(AssemblyFileInfo assemblyFileInfo_0)
		{
			return assemblyFileInfo_0.Path;
		}
Ejemplo n.º 2
0
		private static IEnumerable<AssemblyFileInfo> smethod_1(string string_0)
		{
			List<string> list = new List<string>();
			using (StreamReader streamReader = new StreamReader(string_0))
			{
				while (!streamReader.EndOfStream)
				{
					string text = streamReader.ReadLine();
					if (text.Trim() != "")
					{
						list.Add(text.Trim());
					}
				}
			}
			List<AssemblyFileInfo> list2 = new List<AssemblyFileInfo>();
			foreach (string text in list)
			{
				string text;
				string a = Path.GetExtension(text).ToLower();
				AssemblyFileInfo item;
				if (a == ".exe" || a == ".dll")
				{
					item = new AssemblyFileInfo
					{
						Path = text,
						Name = Path.GetFileNameWithoutExtension(text),
						Version = FileVersionInfo.GetVersionInfo(text).FileVersion
					};
				}
				else
				{
					item = new AssemblyFileInfo
					{
						Path = text,
						Name = "Search Directory",
						Version = "N/A"
					};
				}
				list2.Add(item);
			}
			return list2;
		}
		private static bool smethod_1(AssemblyFileInfo assemblyFileInfo_0)
		{
			return assemblyFileInfo_0.Name != "Search Directory" && assemblyFileInfo_0.Version != "N/A";
		}
		private void method_2(IEnumerable<string> files)
		{
			foreach (string current in files)
			{
				if (!(current.Trim() == ""))
				{
					try
					{
						string a = Path.GetExtension(current).ToLower();
						AssemblyFileInfo fileInfo;
						if (a == ".exe" || a == ".dll")
						{
							fileInfo = new AssemblyFileInfo
							{
								Path = current,
								Name = Path.GetFileNameWithoutExtension(current),
								Version = FileVersionInfo.GetVersionInfo(current).FileVersion
							};
						}
						else
						{
							fileInfo = new AssemblyFileInfo
							{
								Path = current,
								Name = "Search Directory",
								Version = "N/A"
							};
						}
						base.Dispatcher.Invoke(new Action(delegate
						{
							this.assemblyPickerViewModel_0.Assemblies.Add(fileInfo);
						}), new object[0]);
					}
					catch (Exception)
					{
						System.Windows.MessageBox.Show("Problem loading file: " + current);
					}
				}
			}
		}
		private static bool smethod_0(AssemblyFileInfo assemblyFileInfo_0)
		{
			return assemblyFileInfo_0.Name != "Search Directory";
		}