CorCompare.AssemblyCollection.Add C# (CSharp) Method

Add() public method

public Add ( string name ) : bool
name string
return bool
		public bool Add (string name)
		{
			AssemblyDefinition ass = LoadAssembly (name);
			if (ass == null) {
				Console.Error.WriteLine ("Cannot load assembly file " + name);
				return false;
			}

			assemblies.Add (ass);
			return true;
		}

Usage Example

Ejemplo n.º 1
0
		public static int Main (string [] args)
		{
			if (args.Length == 0)
				return 1;

			AbiMode = false;

			AssemblyCollection acoll = new AssemblyCollection ();

			foreach (string arg in args) {
				if (arg == "--abi")
					AbiMode = true;
				else
					acoll.Add (arg);
			}

			XmlDocument doc = new XmlDocument ();
			acoll.Document = doc;
			acoll.DoOutput ();

			var writer = new WellFormedXmlWriter (new XmlTextWriter (Console.Out) { Formatting = Formatting.Indented });
			XmlNode decl = doc.CreateXmlDeclaration ("1.0", "utf-8", null);
			doc.InsertBefore (decl, doc.DocumentElement);
			doc.WriteTo (writer);
			return 0;
		}
All Usage Examples Of CorCompare.AssemblyCollection::Add